------- Comment #54 from potswa at mac dot com 2009-11-03 20:43 ------- Created an attachment (id=18959) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18959&action=view) A couple benchmarks for 32-bit mode and updated fwd+copy
Yikes. Just a second: yesterday I played around with the forward iterator algorithm a little more, and discovered that the reason it benchmarked slower in rotate_speed.txt was that I had changed it to use std::iter_swap instead of std::swap. I don't know if 4.5.0 has whatever compilation issue caused the difference (I'm still testing in 4.2.1), but the new benchmarks show it as being the same speed as my rewrite in -m64 mode. Previous data showing my algo being faster resulted from testing in -m32 mode. Attached are updated benchmarks showing that the only significant advantage to my rewrite is a 12% speedup in -m32 mode for the general case. The advantage to an improved forward/bidirectional iterator version is that it should also help sequences in containers besides std::vector. Also it would be lower impact as the only code added would be the special cases calling std::copy, and the separate bidirectional and RAI algos would go away completely. -- potswa at mac dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18934|0 |1 is obsolete| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41351