January 21, 2005 Re: DMDScript vs. others | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bob |
Ok - I made the vars. global, declared the array of chars statically and came up with results much closer to yours: 3.34:1 (dmc:vc).
Thanks,
- Dave
On Fri, 21 Jan 2005 06:37:38 +0000, Bob wrote:
>
> No typo - just global variables are the cause.
>
> Speed gets much better if vars are being made local
> to main(). In this case I can confirm your findings.
> In case of 'globalisation', however, dmd, dmc and lcc
> are way behind vcpp. Just djgpp gets in its vicinity.
>
> I have posted a bug in dmd to the bugs forum.
> If you are intersted, you might check out the
> 'sieve' coding I have used from there.
>
>
> Remark:
> After checking assembly listings it turnes out that
> vcpp does full optimization on global vars, which
> might or might not be desirable. Djgpp has the best
> compromise of code and speed, still refraining from
> keeping some global variables in the CPU registers.
> However, good code comes at a price: Djgpp is
> compiling way slower than any of the other compilers
> mentioned, thus making development cycles a real test
> for patience.
>
>
>
> In article <csps4d$1ji3$1@digitaldaemon.com>, Dave says...
>>
>>
>>Hey Bob,
>>
>>I basically 'ported' this to C/++ by wrapping the sieve.ds script with main() and type'ing the variables.
>>
>>On a P3, P4 or AMD64 the ratio of VC to DMC is about 1.2:1. I couldn't find a way to make DMC run as slow as posted - are you sure there isn't a typo somewhere?
>>
>>- Dave
>>
>>In article <csosb2$cq8$1@digitaldaemon.com>, Bob says...
>>>
>>>
>>>Tested the (in)famous 'sieve' on an older P3:
>>>
>>>
>>>Results (times in secs):
>>>
>>>2.55 vcpp
>>>4.12 djgpp
>>>8.36 dmc
>>>8.83 lccW32
>>>10.02 dmd
>>>751.00 dms
>>>2403.00 js
>>>
>>>
>>>
>>>Speed relative to D language:
>>>
>>>3.92941 vcpp
>>>2.43204 djgpp
>>>1.19856 dmc
>>>1.13477 lccw32
>>>1.00000 [*] dmd
>>>0.01334 dms
>>>0.00417 js
>>>
>>>
>>>
>>>Remarks:
>>>
>>>- Scripting languages results extrapolated,
>>>don't expect me to wait 2400+ seconds.
>>>- The old dscript version 1.02 (2002-11-30) was already
>>>much faster than JS (it would have scored 981 secs).
>>>- VC seems to like 'sieve', its test results with
>>>other apps were good but not by such a huge margin.
>>>
>>>
>>>
>>>More info:
>>>
>>>JS (V5.6):
>>>10 iterations, 1899 primes, elapsed time = 2403
>>>
>>>dms (V1.03):
>>>10 iterations, 1899 primes, elapsed time = 751
>>>
>>>dmd (V0.111) [-O]:
>>>10000 iterations, 1899 primes, elapsed time = 10.024
>>>
>>>LccW32 (V3.3) [-O -p6]:
>>>10000 iterations, 1899 primes, elapsed time = 8.833
>>>
>>>dmc (V8.41) [-O -6]:
>>>10000 iterations, 1899 primes, elapsed time = 8.362
>>>
>>>DJGpp (gcc V3.43) [-O3 -march=pentium3]:
>>>10000 iterations, 1899 primes, elapsed time = 4.12088
>>>
>>>VCpp (V13.10.3077) [/O2 /G6]:
>>>10000 iterations, 1899 primes, elapsed time = 2.553
>>>
>>>
>>
>>
|
January 21, 2005 Re: DMDScript vs. others | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | If I try to run sieve.html I get: Opera Opera That's all. |
January 21, 2005 Re: DMDScript vs. others | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthias Becker | "Matthias Becker" <Matthias_member@pathlink.com> wrote in message news:csra3d$95f$1@digitaldaemon.com... > If I try to run sieve.html I get: > > Opera Opera > > That's all. It works in other browsers. I wonder what's up with Opera. |
Copyright © 1999-2021 by the D Language Foundation