Skip to content

Instantly share code, notes, and snippets.

@DavidTruby
Last active April 3, 2020 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidTruby/aa885134abcab6746ddef962fd90bfc0 to your computer and use it in GitHub Desktop.
Save DavidTruby/aa885134abcab6746ddef962fd90bfc0 to your computer and use it in GitHub Desktop.
Windows results
PS C:\Users\David Truby\Documents> cl.exe /O2 /DREMOVE_CARRIAGE_RETURNS .\klauslerbench.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.25.28612 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
klauslerbench.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\include\ostream(281): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\include\ostream(266): note: while compiling class template member function 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(int)'
.\klauslerbench.cpp(83): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(int)' being compiled
.\klauslerbench.cpp(83): note: see reference to class template instantiation 'std::basic_ostream<char,std::char_traits<char>>' being compiled
Microsoft (R) Incremental Linker Version 14.25.28612.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:klauslerbench.exe
klauslerbench.obj
PS C:\Users\David Truby\Documents> Measure-Command {.\klauslerbench.exe}
Days : 0
Hours : 0
Minutes : 0
Seconds : 9
Milliseconds : 291
Ticks : 92912281
TotalDays : 0.000107537362268519
TotalHours : 0.00258089669444444
TotalMinutes : 0.154853801666667
TotalSeconds : 9.2912281
TotalMilliseconds : 9291.2281
PS C:\Users\David Truby\Documents> cl.exe /O2 /DREMOVE_IF .\klauslerbench.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.25.28612 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
klauslerbench.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\include\ostream(281): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\include\ostream(266): note: while compiling class template member function 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(int)'
.\klauslerbench.cpp(83): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(int)' being compiled
.\klauslerbench.cpp(83): note: see reference to class template instantiation 'std::basic_ostream<char,std::char_traits<char>>' being compiled
Microsoft (R) Incremental Linker Version 14.25.28612.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:klauslerbench.exe
klauslerbench.obj
PS C:\Users\David Truby\Documents> Measure-Command {.\klauslerbench.exe}
Days : 0
Hours : 0
Minutes : 0
Seconds : 5
Milliseconds : 415
Ticks : 54153363
TotalDays : 6.26775034722222E-05
TotalHours : 0.00150426008333333
TotalMinutes : 0.090255605
TotalSeconds : 5.4153363
TotalMilliseconds : 5415.3363
PS C:\Users\David Truby\Documents> cl.exe /O2 /DBYTE_AT_A_TIME .\klauslerbench.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.25.28612 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
klauslerbench.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\include\ostream(281): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\include\ostream(266): note: while compiling class template member function 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(int)'
.\klauslerbench.cpp(83): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(int)' being compiled
.\klauslerbench.cpp(83): note: see reference to class template instantiation 'std::basic_ostream<char,std::char_traits<char>>' being compiled
Microsoft (R) Incremental Linker Version 14.25.28612.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:klauslerbench.exe
klauslerbench.obj
PS C:\Users\David Truby\Documents> Measure-Command {.\klauslerbench.exe}
Days : 0
Hours : 0
Minutes : 0
Seconds : 6
Milliseconds : 407
Ticks : 64070556
TotalDays : 7.41557361111111E-05
TotalHours : 0.00177973766666667
TotalMinutes : 0.10678426
TotalSeconds : 6.4070556
TotalMilliseconds : 6407.0556
PS C:\Users\David Truby\Documents> clang-cl --version
clang version 9.0.0 (tags/RELEASE_900/final)
Target: i686-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\Llvm\bin
PS C:\Users\David Truby\Documents> clang-cl -O2 -DREMOVE_CARRIAGE_RETURNS .\klauslerbench.cpp
PS C:\Users\David Truby\Documents> Measure-Command {.\klauslerbench.exe}
Days : 0
Hours : 0
Minutes : 0
Seconds : 6
Milliseconds : 782
Ticks : 67820450
TotalDays : 7.84958912037037E-05
TotalHours : 0.00188390138888889
TotalMinutes : 0.113034083333333
TotalSeconds : 6.782045
TotalMilliseconds : 6782.045
PS C:\Users\David Truby\Documents> clang-cl -O2 -DREMOVE_IF .\klauslerbench.cpp
PS C:\Users\David Truby\Documents> Measure-Command {.\klauslerbench.exe}
Days : 0
Hours : 0
Minutes : 0
Seconds : 6
Milliseconds : 472
Ticks : 64728122
TotalDays : 7.49168078703704E-05
TotalHours : 0.00179800338888889
TotalMinutes : 0.107880203333333
TotalSeconds : 6.4728122
TotalMilliseconds : 6472.8122
PS C:\Users\David Truby\Documents> clang-cl -O2 -DBYTE_AT_A_TIME .\klauslerbench.cpp
PS C:\Users\David Truby\Documents> Measure-Command {.\klauslerbench.exe}
Days : 0
Hours : 0
Minutes : 0
Seconds : 6
Milliseconds : 172
Ticks : 61725998
TotalDays : 7.14421273148148E-05
TotalHours : 0.00171461105555556
TotalMinutes : 0.102876663333333
TotalSeconds : 6.1725998
TotalMilliseconds : 6172.5998
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment