Lexer in D
Dmitry Olshansky
dmitry.olsh at gmail.com
Mon Mar 4 10:10:37 PST 2013
04-Mar-2013 16:17, Namespace пишет:
> With reserving of 60% of the file size in memory I get a big speed boost.
>
> ------------------------
> Total time (ms): 17544.6
> Repetitions : 200
> Sample mode : 87 (121 ocurrences)
> Median time : 87.3835
> Avg time : 87.7232
> Std dev. : 1.77905
> Minimum : 84.238
> Maximum : 101.919
> 95% conf.int. : [84.2363, 91.21] e = 3.48687
> 99% conf.int. : [83.1407, 92.3057] e = 4.58252
> EstimatedAvg95%: [87.4766, 87.9697] e = 0.246559
> EstimatedAvg99%: [87.3991, 88.0472] e = 0.324033
>
> But I'm still away from:
> Avg time : 69.3088
> http://forum.dlang.org/thread/dpdgcycrgfspcxenzrjf@forum.dlang.org?page=8#post-abncwoqtpnaoohihkliw:40forum.dlang.org
Keep in mind the CPU you are testing on. What's you chip?
In any case Dscanner has been improved to take far far less time then
60ms. Brain listed graphs showing under 20 ms on his CPU. for all and
<10 for every module in std except std.datetime.
> I've tried also 10%, 40% and 80% but 60% seems optimal.
>
> And I think I reached my performance limit. I could implement the
> LazyForwardRange and, if anyone can confirm the statement of char <->
> dchar decoding and that the usage of ubyte would be (crucial) better, I
> will try this too.
--
Dmitry Olshansky
More information about the Digitalmars-d-learn
mailing list