Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
August 07, 2016 I need a @nogc version of hashOf(). What are the options? | ||||
---|---|---|---|---|
| ||||
I need a @nogc version of hashOf(). Here's one i'm currently using but it's not marked as @nogc. https://github.com/dlang/druntime/blob/master/src/object.d#L3170 What are the options now? Is there anything D offers that I could use? I need a function that takes a variable of any type and returns a numeric hash. |
August 07, 2016 Re: I need a @nogc version of hashOf(). What are the options? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Gary Willoughby | On Sunday, 7 August 2016 at 16:42:47 UTC, Gary Willoughby wrote:
> I need a @nogc version of hashOf(). Here's one i'm currently using but it's not marked as @nogc.
>
> https://github.com/dlang/druntime/blob/master/src/object.d#L3170
>
> What are the options now?
>
> Is there anything D offers that I could use? I need a function that takes a variable of any type and returns a numeric hash.
Current DMD master has MurmurHash3 digest.
|
August 07, 2016 Re: I need a @nogc version of hashOf(). What are the options? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Gary Willoughby | On 08/07/2016 06:42 PM, Gary Willoughby wrote: > I need a @nogc version of hashOf(). Here's one i'm currently using but > it's not marked as @nogc. > > https://github.com/dlang/druntime/blob/master/src/object.d#L3170 That seems to be an oversight. https://github.com/dlang/druntime/pull/1624 |
August 07, 2016 Re: I need a @nogc version of hashOf(). What are the options? | ||||
---|---|---|---|---|
| ||||
Posted in reply to ag0aep6g | On 08/07/2016 07:10 PM, ag0aep6g wrote:
> https://github.com/dlang/druntime/pull/1624
Has been merged. Is going to be part of 2.072.
|
August 07, 2016 Re: I need a @nogc version of hashOf(). What are the options? | ||||
---|---|---|---|---|
| ||||
Posted in reply to ag0aep6g | On Sunday, 7 August 2016 at 18:37:19 UTC, ag0aep6g wrote:
> On 08/07/2016 07:10 PM, ag0aep6g wrote:
>> https://github.com/dlang/druntime/pull/1624
>
> Has been merged. Is going to be part of 2.072.
Very cool!
MurmurHash3 is a great addition too. Thanks guys.
|
Copyright © 1999-2021 by the D Language Foundation