Interesting performance results on Crc port from zlib

Igor stojkovic.igor at gmail.com
Sun Jan 24 16:23:24 UTC 2021


On Sunday, 24 January 2021 at 15:47:38 UTC, Steven Schveighoffer 
wrote:
>
> Probably inlining. If you are using a compiled library, it 
> can't inline the code, it has to be an opaque call.
>
> -Steve

I tried to modify dub build to exclude inlining. This how it says 
it is compiling and linking:

ldc2 -c 
-of.dub/build/testapp-release-linux.posix-x86_64-ldc_2094-828693E6DA608B0503B8ABCD1F00F7D4/dzlibtestapp.o -release -O3 -w -oq -od=.dub/obj -d-version=Have_dzlib -Isource/ source/crc32.d test/test.d -vcolumns
Linking...
ldc2 
-of.dub/build/testapp-release-linux.posix-x86_64-ldc_2094-828693E6DA608B0503B8ABCD1F00F7D4/dzlibtestapp .dub/build/testapp-release-linux.posix-x86_64-ldc_2094-828693E6DA608B0503B8ABCD1F00F7D4/dzlibtestapp.o -L--no-as-needed

I still get the same numbers in LDC release build. I forgot to 
mention I use this to measure the execution:

auto implDurs = benchmark!(zlibCrc, phobosCrc, dzlibCrc)(100_000);

And I am processing the same global 4K buffer in each.


More information about the Digitalmars-d mailing list