| Thread overview | ||||||||
|---|---|---|---|---|---|---|---|---|
|
May 03, 2009 For Leandro | ||||
|---|---|---|---|---|
| ||||
Another small one for Leandro Lucarella:
struct S { int a; S* p; }
void main() {
foreach (ref s; new S*[4_000_000])
s = new S;
}
Timings N=4_000_000, best of 3, seconds:
D1: 2.47
D2: 2.68
On WinXp, Core2 2 GHz, last DMD1 and DMD2.
In future I may use private email instead.
Bye,
bearophile
| ||||
May 03, 2009 Re: For Leandro | ||||
|---|---|---|---|---|
| ||||
Posted in reply to bearophile | bearophile wrote:
> Another small one for Leandro Lucarella:
>
> struct S { int a; S* p; }
> void main() {
> foreach (ref s; new S*[4_000_000])
> s = new S;
> }
>
> Timings N=4_000_000, best of 3, seconds:
> D1: 2.47
> D2: 2.68
>
> On WinXp, Core2 2 GHz, last DMD1 and DMD2.
Fedora-10, Core2 Quad, 2.4GHz, last DMD2,
dmd -release -O :
real 0m2.398s
user 0m2.337s
sys 0m0.061s
| |||
May 03, 2009 Re: For Leandro | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Georg Wrede | Georg Wrede:
> Fedora-10, Core2 Quad, 2.4GHz, last DMD2,
> dmd -release -O :
> real 0m2.398s
> user 0m2.337s
> sys 0m0.061s
Thank you for your timing. It is consistent with the my time.
But the purpose of my little test was to show that for little benchmark there's a performance decrease between D1 and D2 (probably because of the GC). So can you show the timing for D1 too on the same machine of yours?
Bye,
bearophile
| |||
May 03, 2009 Re: For Leandro | ||||
|---|---|---|---|---|
| ||||
Posted in reply to bearophile | bearophile wrote:
> Georg Wrede:
>> Fedora-10, Core2 Quad, 2.4GHz, last DMD2,
>> dmd -release -O :
>> real 0m2.398s
>> user 0m2.337s
>> sys 0m0.061s
>
> Thank you for your timing. It is consistent with the my time.
> But the purpose of my little test was to show that for little
> benchmark there's a performance decrease between D1 and D2 (probably
> because of the GC). So can you show the timing for D1 too on the same
> machine of yours?
real 0m2.218s
user 0m2.169s
sys 0m0.047s
This is best of three. But I'm convinced there's too much variation with best of three. Middle of ten would be somewhat better.
| |||
May 03, 2009 Re: For Leandro | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Georg Wrede | Georg Wrede: > real 0m2.218s > user 0m2.169s > sys 0m0.047s Thank you. Such results are in line with mine. Leandro will like that. > This is best of three. But I'm convinced there's too much variation with best of three. Middle of ten would be somewhat better. I agree. I usually time things more than three times, but three is the minimum :-) Bye, bearophile | |||
May 04, 2009 Re: For Leandro | ||||
|---|---|---|---|---|
| ||||
Posted in reply to bearophile | bearophile, el 3 de mayo a las 15:03 me escribiste: > Another small one for Leandro Lucarella: > > struct S { int a; S* p; } > void main() { > foreach (ref s; new S*[4_000_000]) > s = new S; > } Thanks! =) -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply