On 5/9/22 22:12, MichaelBi wrote: > On Tuesday, 10 May 2022 at 04:21:04 UTC, Ali Çehreli wrote: >> On 5/9/22 20:38, rikki cattermole wrote: >> >> > [...] >> >> Yes! :) >> >> Assuming the data is indeed validated in some way, the following >> should be even faster. It validates the data after the fact: >> >> [...] > > this is cool!
I've been meaning to write about a bug in my code, which would likely cause zero issues, and which you've probably already fixed. ;)
BAD: auto counts = new ulong[char.max]; GOOD: auto counts = new ulong[char.max - char.min + 1]; FINE: auto counts = new ulong[256]; > thanks for your time and i really like your book > Programming in D :) Yay! :) Ali