In my program, hashes are only 20% faster than sets containing approximately 20
elements that are S-expressions.
I solved the mystery of why switching to lists with unique elements made things
faster and in some cases even changed the meaning of the program. I always
thought that my program wou
The sets are about 20 elements in size.
It seems that ‘member’ before ‘cons’ is marginally faster than
‘remove-duplicates’ after ‘cons’, as one would expect.
But it’s the strangest thing: in some cases switching from sets to lists with
unique elements changes the meaning of the program! I spent
On Tue, 04 Dec 2018 at 15:50 -0500, 'Leandro Facchinetti' via Racket Users
wrote:
> I rewrote a codebase that was using ‘set’s to use lists that I
> ‘remove-duplicates’ whenever I ‘cons’. The result is orders of
> magnitude faster. Do you have any idea why?
Why not member before cons?
I imagine
How long were the lists?
Operations on small lists are fast.
Den tir. 4. dec. 2018 kl. 21.50 skrev 'Leandro Facchinetti' via Racket
Users :
> I rewrote a codebase that was using ‘set’s to use lists that I
> ‘remove-duplicates’ whenever I ‘cons’. The result is orders of magnitude
> faster. Do you
I rewrote a codebase that was using ‘set’s to use lists that I
‘remove-duplicates’ whenever I ‘cons’. The result is orders of magnitude
faster. Do you have any idea why?
--
Leandro Facchinetti
https://www.leafac.com
--
You received this message because you are subscribed to the Google Groups
5 matches
Mail list logo