August 17, 2020 Re: Should std.conv:parse parse html entities? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sebastiaan Koppe | On 8/17/20 12:44 PM, Sebastiaan Koppe wrote: > On Friday, 15 November 2019 at 01:13:27 UTC, Jonathan Marler wrote: >> On Thursday, 14 November 2019 at 20:23:57 UTC, berni44 wrote: >>> On Thursday, 14 November 2019 at 18:14:07 UTC, Suleyman wrote: >>>> What is the concern about the table? Is it binary size, runtime performance, or something else? >>> >>> I think binary size. Runtime shouldn't be a problem, because it should be possible to implement a perfect hash table for that (or an other fast lookup method). >> >> A compile-time perfect hash generator sounds like a really nice feature. Someone should get on that. > > Mine gets pretty close, if only there was a compile time random number generator: https://github.com/skoppe/perfect-hash Does this trick still work? https://p0nce.github.io/d-idioms/#Compile-time-RNG |
August 18, 2020 Re: Should std.conv:parse parse html entities? | ||||
---|---|---|---|---|
| ||||
Posted in reply to James Blachly | On Tuesday, 18 August 2020 at 01:13:30 UTC, James Blachly wrote:
> On 8/17/20 12:44 PM, Sebastiaan Koppe wrote:
>> Mine gets pretty close, if only there was a compile time random number generator: https://github.com/skoppe/perfect-hash
>
> Does this trick still work?
>
> https://p0nce.github.io/d-idioms/#Compile-time-RNG
I am aware of that trick, but I have unittests where I invoke the rng 100's of thousands of times, and I don't think the compiler will like that.
|
Copyright © 1999-2021 by the D Language Foundation