This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code from https://blog.codef00.com/2023/04/13/casey-muratori-is-wrong-about-clean-code | |
// I've created this file to try to reproduce the results in this blog. | |
// This little program was timed with Measure-Command { a.exe 9999999 | Out-Default } repeatedly | |
// and compiled with Clang 16.0.0 x86_64-pc_windows-msvc with the command clang++.exe -std=c++17 -O3 cleancodebench.cpp. | |
// On my hardware and operating system Ryzen 7 5800X and Windows 11 I couldn't reproduce the results. | |
// My ranking was: | |
// 1. TestTotalAreaSwitch4 ~15ms | |
// 2. TestTotalAreaSwitch ~550ms | |
// 4. TestTotalAreaVariant ~550ms | |
// 3. TestTotalAreaVariant4 ~590ms |