unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* hashes
@ 2022-04-05 21:43 Stefan Israelsson Tampe
  0 siblings, 0 replies; only message in thread
From: Stefan Israelsson Tampe @ 2022-04-05 21:43 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]

I can now demonstrate that the hash implementation is around as fast as
guile internal implementation. But for some workloads like if we have a
hash with millions of elements. And lookups a working set of about 10000
key hash pairs the speed is doubled compared to guiles internal. Now this
is maybe not as interesting. But the implementation is decoupled and allows
one to construct custom hashing algorithms that are fast compared to
guile's current speed when it comes to the hash tables (hash,eq,assoc) is
never called from the inside of the hash function which means that any
custom implementation lives in scheme totally. The fast execution was
enabled by implementing the hash function as a vm operation and compiling
it with a size 1<<60 (% is efficiently optimized as a logand) and hence we
got essentially the same speed using a vm-op for hashq. Next I will see how
fast we can make hashtables when pushing the hash-ref equivalent to a
vm-operation. With this we can now get a hash algo that mimics the python
algo.

[-- Attachment #2: Type: text/html, Size: 1060 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-05 21:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05 21:43 hashes Stefan Israelsson Tampe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).