erlang:phash2(now())

Lev Walkin vlm at lionet.info
Thu Oct 7 22:46:28 EDT 2010


Do you have a robust policy of accepting outside patches?

On Oct 7, 2010, at 6:47 PM, David Smith wrote:

>> make_ref is 6 times faster than erlang:phash2(make_ref()) which is  
>> 50%
>> faster than erlang:phash2(now()).
>>
>> Of course, in the grand scheme of things this might not be your  
>> biggest
>> bottleneck, but why hashing now() when there exsists an idiomatic  
>> make_ref()
>> solution? Am I missing something?
>
> You're not missing anything, I think. make_ref() seems like a logical
> and reasonable alternative. As you said, however, it's not (anywhere
> near) our biggest bottleneck -- last time I ran the profiler it didn't
> even show up in the top 100 hotspots. :)
>
> Thanks,
>
> D.

-- 
vlm





More information about the riak-users mailing list