Python Forum
Module for procedural generation with hashes
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Module for procedural generation with hashes
#7
Version 0.0.3 will use the core md5 module instead of xxhash. Although xxhash seems to win in a direct performance test, in practice it makes very little difference, and using md5 actually seems to be faster in the real world. For me, it is not worth the price of having to install xxhash, which also needs a C++ compiler. That's a fight I don't want to have with chance management, to require a C++ compiler in order to run my Python code.

This, of course, will totally trash seed-compatibility. But that's what 0.0.x versions are for. Oh well.

I suppose I could take the hash function as a lambda, and then the application could import whichever hash library it wants. pghash would need to be sensitive to the length of the hash returned though, as xxhash returns 64 bits and md5 returns 128, and that's an extra test I don't want to have to do.
Reply


Messages In This Thread
RE: Module for procedural generation with hashes - by PhilHibbs - Dec-20-2017, 09:55 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Cute oscillating range generation snippet I saw on irc league55 1 2,865 Mar-26-2018, 04:19 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020