cperivol
2021-12-6 12:48:57

I am looking for an efficient collection to store unique symbols (like seteq but I know everything in there will be a symbol so I would prefer to avoid the O(N) insertion). Is there anything like that out there?


sorawee
2021-12-6 12:52:23

But why can’t you use seteq?


laurent.orseau
2021-12-6 14:00:26

Why not a hasheq?


massung
2021-12-6 14:03:04

Looking at set-add’s documentation: > This operation runs in constant time for hash sets. Then following the link for hash sets: > A hash set is a set whose elements are compared via equal?, eqv?, or eq? and partitioned via equal-hash-code, eqv-hash-code, or eq-hash-code.


massung
2021-12-6 14:04:14

So wouldn’t symbols and seteq be O(1) insertion by the above definition?


kristian.lundstrom
2021-12-6 17:03:09

@kristian.lundstrom has joined the channel


samdphillips
2021-12-6 18:25:35

Oof 7am is tough


spdegabrielle
2021-12-6 18:26:36

I think most people are either catching up on sleep, or have stuff to do at 7am


samdphillips
2021-12-6 18:27:58

Unless you are using a list set (which you probably shouldn’t)


badkins
2021-12-7 04:09:44

Absolutely. I was “bitten” by this recently.