first numbers: type function vs template
Stefan Koch
uplink.coder at googlemail.com
Fri Aug 21 22:42:57 UTC 2020
On Friday, 21 August 2020 at 19:13:30 UTC, Stefan Koch wrote:
> And it results in:
> Benchmark #1: generated/linux/release/64/dmd
> test_getBaseClass.d -sktf -o-
> Time (mean ± σ): 21.4 ms ± 2.8 ms [User: 16.8 ms,
> System: 4.9 ms]
> Range (min … max): 14.0 ms … 29.3 ms 500 runs
>
> Benchmark #2: generated/linux/release/64/dmd
> test_getBaseClass.d -sktf -version=templ -o-
> Time (mean ± σ): 33.0 ms ± 2.6 ms [User: 26.9 ms,
> System: 6.3 ms]
> Range (min … max): 24.9 ms … 41.6 ms 500 runs
>
> Summary
> 'generated/linux/release/64/dmd test_getBaseClass.d -sktf
> -o-' ran
> 1.54 ± 0.24 times faster than
> 'generated/linux/release/64/dmd test_getBaseClass.d -sktf
> -version=templ -o-'
Actually I was mislead by the results.
I forgot to subtract the overhead.
A file with the content "class C0{}"
takes on the same machine and comparable load 8.5 milliseconds.
Let's be generous and round it down to 8 milliseconds.
That means the real speedup is (33.0 - 8) / (21.4 - 8).
And with that we are at almost 1.9x on average.
If we compare the two min values: (24.9 - 8) / (14.0 - 8)
We are even at 2.8x.
More information about the Digitalmars-d
mailing list