On Friday, 9 September 2016 at 12:09:32 UTC, Steven Schveighoffer
wrote:
On 9/8/16 6:57 PM, Stefan Koch wrote:
Hi Guys,
I have some more data.
In the binderoo example the main time is spent in the backend.
generating code and writing objects files.
If we ever get Rainer's patch to collapse repetitive templates,
we may help this problem. https://github.com/dlang/dmd/pull/5855
The front-end spends most of it's time comparing strings of
unique
type-names :)
I thought the front end was changed to use the string pointer
for symbol names as the match so string comparisons aren't done?
In this case the string is freshly and not available as reference
to an already lexed string
.
Hm... maybe to intern the string? That kind of makes sense.
Yes that would be the way to go.
I just had a thought. If you hash the string, and then compare
the length of the string and first and last character along
with the hash, what are the chances of it being a false
positive?
This depends entirely on the distribution of strings.
It's probably quite high :)