Re: string hash significant speedup

2017-08-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/10/17 6:30 PM, HyperParrow wrote: On Thursday, 10 August 2017 at 20:07:35 UTC, Steven Schveighoffer wrote: On 8/10/17 3:36 PM, Johnson Jones wrote: when using T[string], hashing is used. Computing the hash is slow(relatively speaking). Does D cache the hashes? Strings are immutable so th

Re: string hash significant speedup

2017-08-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/10/17 5:10 PM, Johnson Jones wrote: On Thursday, 10 August 2017 at 20:07:35 UTC, Steven Schveighoffer wrote: On 8/10/17 3:36 PM, Johnson Jones wrote: when using T[string], hashing is used. Computing the hash is slow(relatively speaking). Does D cache the hashes? Strings are immutable so

Re: string hash significant speedup

2017-08-10 Thread HyperParrow via Digitalmars-d-learn
On Thursday, 10 August 2017 at 20:07:35 UTC, Steven Schveighoffer wrote: On 8/10/17 3:36 PM, Johnson Jones wrote: when using T[string], hashing is used. Computing the hash is slow(relatively speaking). Does D cache the hashes? Strings are immutable so there is absolutely no reason why the has

Re: string hash significant speedup

2017-08-10 Thread Johnson Jones via Digitalmars-d-learn
On Thursday, 10 August 2017 at 20:07:35 UTC, Steven Schveighoffer wrote: On 8/10/17 3:36 PM, Johnson Jones wrote: when using T[string], hashing is used. Computing the hash is slow(relatively speaking). Does D cache the hashes? Strings are immutable so there is absolutely no reason why the has

Re: string hash significant speedup

2017-08-10 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/10/17 3:36 PM, Johnson Jones wrote: when using T[string], hashing is used. Computing the hash is slow(relatively speaking). Does D cache the hashes? Strings are immutable so there is absolutely no reason why the hash ever need to be computed more than once. It computes them on insertion