You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tested in GCC 4.8.2. (on Windows). For non-optimized version Mach7 is more-less 1.35 times faster. When compiled with -O2, boost::static_visitor is about 4.5 times faster. The results from a couple of runs (measured in clock ticks):
Either Mach7 got faster, or Boost.Variant slower, or I messed something with the previous benchmark. I run these with maximum optimizations and assertions disabled.
The issue hasn't been addressed yet, so the difference would still be there. Have you re-ran the experiment i patched above? I manually inlined both stuff as this was an issue affecting other experiments too - maybe that's the improvement you see. Did you test it with MSVC 14 before too or with MSVC 12?
Indeed. Previously I tested only GCC 4.8.2 on Windows (no MSVC at all). Now I am testing on GCC 4.8.2 (same GCC) and MSVC 14.0. I also can't remember if I disabled assertions when testing previously. I tested my original benchmark. Using your fixes (and my increased constants -- to make the test longer) I get these:
On Dec 12, 2014, at 15:23, Andrzej Krzemienski wrote:
Hi Yuriy,
I have made a simple benchmark of visiting boost::variant with Mach7 vs using boost::static_visitor. Here is the code of the benchmark (fairly short):
https://akrzemi1.wordpress.com/examples/mach7-benchmark/
I tested in GCC 4.8.2. (on Windows). For non-optimized version Mach7 is more-less 1.35 times faster. When compiled with -O2, boost::static_visitor is about 4.5 times faster. The results from a couple of runs (measured in clock ticks):
optimized:
mach7 visit
908 204
915 199
908 202
931 199
945 201
905 198
non-optimized:
mach7 visit
8304 11599
8575 11624
10144 11888
8394 12472
8252 11628
8591 11628
boost::static_visitor probably does something similar to Mach7: a switch on an integer.
Regards,
Andrzej
The text was updated successfully, but these errors were encountered: