reason-seoul / rescript-collection

Fast and efficient, persistent immutable collection for JS written in 100% ReScript!
https://rescript-collection.pages.dev
MIT License
56 stars 4 forks source link

add rescript-hashmap #25

Closed namenu closed 3 years ago

namenu commented 3 years ago

19

This PR brings the basic implementation of an immutable version of hash-map/set.

changeset-bot[bot] commented 3 years ago

๐Ÿฆ‹ Changeset detected

Latest commit: 7218b58814b7487ae7aa1dbf7b43246f1e4607d5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------------- | ----- | | rescript-hashmap | Major |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

cometkim commented 3 years ago

์ด๊ฒŒ HashMap ์ธ์ง€ TreeMap ์ธ์ง€ ํ•ญ์ƒ ๊ถ๊ธˆํ–ˆ๋Š”๋ฐ... HashMap ์ด ๋งž๋Š”๊ฐ€๋ณด๊ตฐ์š”...?

namenu commented 3 years ago

๊ฐ๊ฐ insert/remove ์‚ผ๋ฐฑ๋งŒ ๊ฑด์„ ์ˆ˜ํ–‰ํ•œ ์†๋„๋ฅผ ๋น„๊ตํ•ด๋ดค์Šต๋‹ˆ๋‹ค.

[HashSet] elapsed: 1681
[Belt.Set.Int] elapsed: 2307
[HashSet] elapsed: 1639
[Belt.Set.Int] elapsed: 2318
[HashSet] elapsed: 1639
[Belt.Set.Int] elapsed: 2297

Belt.Set.Int (AVL-tree ๊ตฌํ˜„) ๋ณด๋‹ค 30% ์ •๋„ ๋น ๋ฆ…๋‹ˆ๋‹ค. ๐Ÿ˜ƒ

cometkim commented 3 years ago

Belt.Set.Int (AVL-tree ๊ตฌํ˜„) ๋ณด๋‹ค 30% ์ •๋„ ๋น ๋ฆ…๋‹ˆ๋‹ค. smiley

์™€์šฐ! ์—„์ฒญ๋‚œ ์„ฑ๊ณผ์ธ๋ฐ์š”??