tobspr / FastDynamicCast

Fast dynamic cast in C++ for MSVC, outperforming the regular dynamic cast by up to 25 times
MIT License
102 stars 6 forks source link

Testing in mac #6

Closed ghost closed 7 years ago

ghost commented 7 years ago
~/test/FastDynamicCast/dcast_performance [master] $ g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer//usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
~/test/FastDynamicCast/dcast_performance [master] $ g++ main.cpp --std=c++11  && ./a.out
main.cpp:64:13: warning: backslash and newline separated by space [-Wbackslash-newline-escape]
  //      | \
            ^
1 warning generated.
Measure Regular dynamic cast simple: 62 ms
Measure Fast dynamic cast simple: 67 ms
Measure Regular dynamic cast complex: 171 ms
Measure Fast dynamic cast complex: 180 ms
Measure Threaded regular dynamic cast complex: 190 ms
Measure Threaded fast dynamic cast complex: 182 ms
~/test/FastDynamicCast/dcast_performance [master] $ g++ main.cpp --std=c++11 -O2 && ./a.out
main.cpp:64:13: warning: backslash and newline separated by space [-Wbackslash-newline-escape]
  //      | \
            ^
1 warning generated.
Measure Regular dynamic cast simple: 36 ms
Measure Fast dynamic cast simple: 39 ms
Measure Regular dynamic cast complex: 81 ms
Measure Fast dynamic cast complex: 76 ms
Measure Threaded regular dynamic cast complex: 91 ms
Measure Threaded fast dynamic cast complex: 84 ms
tobspr commented 7 years ago

Hi, I will have a look at the warnings.

Notice that the fast dynamic cast fallbacks to regular dynamic cast on when not compiling with MSVC, so you will not see any performance benefits.

tobspr commented 7 years ago

The warnings are safe to ignore, just compile with -Wbackslash-newline-escape as the compiler output suggested.

I will close this PR since its unclear for me what you are asking