Re: [racket-users] The performance of ‘set’ vs. lists+‘remove-duplicates’

2018-12-06 Thread 'Leandro Facchinetti' via Racket Users
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

Re: [racket-users] The performance of ‘set’ vs. lists+‘remove-duplicates’

2018-12-05 Thread 'Leandro Facchinetti' via Racket Users
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

Re: [racket-users] The performance of ‘set’ vs. lists+‘remove-duplicates’

2018-12-04 Thread Jack Rosenthal
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

Re: [racket-users] The performance of ‘set’ vs. lists+‘remove-duplicates’

2018-12-04 Thread Jens Axel Søgaard
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

[racket-users] The performance of ‘set’ vs. lists+‘remove-duplicates’

2018-12-04 Thread '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 have any idea why? -- Leandro Facchinetti https://www.leafac.com -- You received this message because you are subscribed to the Google Groups