New UTF-8 stride function

Dmitry Olshansky dmitry.olsh at gmail.com
Mon May 27 12:16:07 PDT 2013


27-May-2013 01:13, Vladimir Panteleev пишет:
> On Sunday, 26 May 2013 at 20:49:36 UTC, Dmitry Olshansky wrote:
>> It's the kind of thing that is tremendously hard to measure accurately
>> since it depends on the workload, architecture and the time spent is
>> very small. So don't take it by word I'm almost certain that something
>> is amiss (compiler switches and whatnot).
>
> For such cases, I found Agner's benchmarking utilities to be very
> useful. They print exact CPU statistics, such as numbers of micro-ops,
> cache misses, mispredicted branches, etc. I've used them very
> successfully when tuning my appender implementation.
>

Yes, Agner is da man. Just hoped I could postpone this but... welcome to 
the micro-optimization world I guess.

> To use them with D, I modified his C++ program to load a DLL and call a
> function, taking the DLL and function names from the command line.
>
> Original program:
> http://www.agner.org/optimize/testp.zip
>
> My patch (to load a DLL):
> http://dump.thecybershadow.net/5f55e8be5f8cd38ad60f218957ef24bb/PMCTestB.diff
>
>
> Usage example (sort of):
> https://github.com/CyberShadow/DAppenderResearch/blob/master/go-dll.bat
>
> Hope this helps :)

Thanks, I'll try it out. But jezz I have win8 so I'd start with linux 
version :)

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list