fun project - improving calcHash
qznc
qznc at web.de
Mon Jun 24 07:30:15 PDT 2013
On Sunday, 23 June 2013 at 21:22:40 UTC, Walter Bright wrote:
> https://github.com/D-Programming-Language/dmd/blob/master/src/root/stringtable.c#L21
>
> Profiling shows the calcHash function is a significant
> contributor to compilation time (3.25% of total time). So
> making it faster is a win. Even making dmd 1% faster would be a
> nice win - all those little drops add up.
To make dmd 1% faster, calcHash must be reduced to 69% run time.
Does not look possible.
Also, why is it implemented twice -- in src/root/stringtable.c
and in src/root/root.c?
Improving AAs by changing the data structure seems to be more
worthwhile. They use a linked list internally, which is not
exactly cache-friendly. From your gprof run the potential is
mostly 5.19% _aaGetRvalue + 1.30% _aaGet.
More information about the Digitalmars-d
mailing list