Khaled, I'm noticing about a 4x speed improvement in most test cases, so thanks! I would like to test this with values greater than 100, like 1000 or 10,000. Can you explain in some detail what this function does, and what the value means?
There is one scenario where no meaningful speed improvement is detected. That's when echoing a flood of text that contains various unicode symbols, especially through font linking (my hypothesis is that font linking is the bottleneck). Even just a few dozen symbols causes a 100 times slowdown on this accelerated graphics, 2.66 GHz Core2 Duo, 8 gig ram machine, compared to strings that contain ASCII only, according to my $calc($ticks - %ticks) benchmarks.