Commit graph

5436 commits

Author SHA1 Message Date
Folkert
d2d87949c8
remove random write to pointer 2023-12-11 21:07:15 +01:00
Folkert
590282b14f
make glue use a setjmp/longjmp panic handler 2023-12-11 20:33:21 +01:00
Brendan Hansknecht
3120dee509
Merge pull request #6238 from roc-lang/dict-follow-up
Dict follow up and addition of releaseExcessCapacity
2023-12-11 02:15:44 -08:00
Brendan Hansknecht
ec3b916c8f
Merge pull request #6249 from roc-lang/refcount-ptr-naming-cleanup
Cleanup list and str builtin naming from refcount to allocation
2023-12-11 00:19:35 -08:00
Brendan Hansknecht
f262102299
cleanup list and str builtin naming from refcount to allocation 2023-12-10 19:52:28 -08:00
Brendan Hansknecht
156a462f1d
update uitest and mono_test 2023-12-10 11:24:22 -08:00
ptaszor3
58b73ae257
Fixed some formatting 2023-12-10 19:58:23 +01:00
Brendan Hansknecht
199e84e91e
add some missed symbols that roc needs 2023-12-10 19:58:22 +01:00
Brendan Hansknecht
eeeccfb143
fix dce of compiler-rt 2023-12-10 19:58:22 +01:00
Brendan Hansknecht
75aa84f825
Remove hashflooding comment
I think for now it is not worth considering adding hashflooding mitigation to the Roc Dict.
1. Wyhash is a secure enough has to pass SMHasher.
2. Languages like Go use wyhash in production and have not seen hashflooding issues.
3. We do have a random seed that Dicts use that changes per application linking. (Could monomorphize on Dict type for more randomness)
4. Any sort of fallback checks will lead to worse performance in the normal case.
5. A reasonable http server or app can limit the size of JSON or number of HTTP headers to accept.
2023-12-10 19:58:21 +01:00
Brendan Hansknecht
279ea48def
tell windows that we use floats? 2023-12-10 19:58:20 +01:00
Brendan Hansknecht
a86cd28d1d
wasm is not friends with compiler-rt 2023-12-10 19:58:20 +01:00
Brendan Hansknecht
5ec5f63a19
libc is a lie, tell bitcode that roc targets a world where libc might not exist 2023-12-10 19:58:20 +01:00
Brendan Hansknecht
27eea90bc3
correct wrong test case 2023-12-10 19:58:19 +01:00
Brendan Hansknecht
2d0ba0a792
remove all compiler-rt and libc code ports from zig bitcode 2023-12-10 19:58:19 +01:00
Brendan Hansknecht
4c76a224b5
bundle compiler-rt through zig 2023-12-10 19:58:19 +01:00
Brendan Hansknecht
8d8e498f11
remove unnecessary call to math.floor in bitcode 2023-12-10 19:58:18 +01:00
Brendan Hansknecht
c902a01c99
update uitest and mono_test 2023-12-10 19:58:18 +01:00
Brendan Hansknecht
e877c22935
fix Dict.listGetUnsafe to map to low level without wrapping 2023-12-10 19:58:17 +01:00
Brendan Hansknecht
3aa9908cb3
Swap Dict implementation to ankerl dense unordered
ankerl::dense_unordered is a very fast hash map that is built to be an index map.
This enables extra optimizations compared to just wrapping a regular hash map.
As such, I think this map is very well suited for our index map impl in Roc.
I also think this dictionary implementation is simpler overall.
On top of that, this removes the need for SIMD instructions for peak performance.

Benchmarks of the C++ version and other C++ hash maps are here: https://martin.ankerl.com/2022/08/27/hashmap-bench-01/
Though this has clear bias of being written by the author of ankerl::dense_unordered,
the results all look correct and the benchmarks thorough.
2023-12-10 19:58:17 +01:00
JRI98
3a86f5de22
Fix format for the 'as' keyword 2023-12-10 19:58:16 +01:00
ptaszor3
7162fbddd3
Fixed the multiline dbg formatting 2023-12-10 19:58:09 +01:00
ptaszor3
6a6d5cebc0
resolved issue 6188 and added some tests 2023-12-10 19:57:49 +01:00
Brendan Hansknecht
b39d604745
Dict follow up and addition of releaseExcessCapacity 2023-12-10 00:06:58 -08:00
Brendan Hansknecht
1ad9933b38
add some missed symbols that roc needs 2023-12-09 18:33:23 -08:00
Brendan Hansknecht
e621de328d
fix dce of compiler-rt 2023-12-09 18:11:23 -08:00
Brendan Hansknecht
ba28ba7ca3
Remove hashflooding comment
I think for now it is not worth considering adding hashflooding mitigation to the Roc Dict.
1. Wyhash is a secure enough has to pass SMHasher.
2. Languages like Go use wyhash in production and have not seen hashflooding issues.
3. We do have a random seed that Dicts use that changes per application linking. (Could monomorphize on Dict type for more randomness)
4. Any sort of fallback checks will lead to worse performance in the normal case.
5. A reasonable http server or app can limit the size of JSON or number of HTTP headers to accept.
2023-12-09 18:11:23 -08:00
Brendan Hansknecht
cd42ed629a
tell windows that we use floats? 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
3dc1389cdd
wasm is not friends with compiler-rt 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
8aa68ccf8e
libc is a lie, tell bitcode that roc targets a world where libc might not exist 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
c87dcd1205
correct wrong test case 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
797ba64003
remove all compiler-rt and libc code ports from zig bitcode 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
be06599bb6
bundle compiler-rt through zig 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
f738d5a2bf
remove unnecessary call to math.floor in bitcode 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
d202b77ae1
update uitest and mono_test 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
65c5a490b8
fix Dict.listGetUnsafe to map to low level without wrapping 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
51ec4311b5
Swap Dict implementation to ankerl dense unordered
ankerl::dense_unordered is a very fast hash map that is built to be an index map.
This enables extra optimizations compared to just wrapping a regular hash map.
As such, I think this map is very well suited for our index map impl in Roc.
I also think this dictionary implementation is simpler overall.
On top of that, this removes the need for SIMD instructions for peak performance.

Benchmarks of the C++ version and other C++ hash maps are here: https://martin.ankerl.com/2022/08/27/hashmap-bench-01/
Though this has clear bias of being written by the author of ankerl::dense_unordered,
the results all look correct and the benchmarks thorough.
2023-12-09 18:11:22 -08:00
JRI98
0599066865
Fix format for the 'as' keyword 2023-12-07 10:46:58 +00:00
Anton-4
c4c1e66d1c
Merge pull request #6209 from roc-lang/remove-max-nat-mention
Num.maxNat does not exist
2023-12-06 20:44:49 +01:00
Richard Feldman
6f0857d7da
Merge pull request #6202 from roc-lang/substring-slices
Create seamless slices when getting a substring
2023-12-06 14:31:01 -05:00
Brendan Hansknecht
ca71409a76
add comment on slice construction 2023-12-06 11:26:52 -08:00
Anton-4
e16f2bbc01
Num.maxNat does not exist
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2023-12-06 18:19:27 +01:00
Brendan Hansknecht
81eff6a23f
Merge pull request #6176 from roc-lang/set-perf
Improve perf of Dict and Set
2023-12-06 02:02:01 -08:00
Brendan Hansknecht
087ca115c9
create seamless slices when getting a substring 2023-12-05 22:46:43 -08:00
Brendan Hansknecht
9889984dd4
Merge pull request #6193 from horriblename/Fix-typos
Fix typos
2023-12-05 15:31:11 -08:00
Brendan Hansknecht
86eae30247
Merge pull request #6182 from CrepeGoat/patch-1
Update Num.roc - fix docstring typos
2023-12-05 14:28:39 -08:00
Brendan Hansknecht
64df1c6921
update uitest and mono_test 2023-12-05 14:13:18 -08:00
Brendan Hansknecht
a2cc17e8e9
write keepShared in a way that doesn't break dev-wasm 2023-12-05 14:12:10 -08:00
Brendan Hansknecht
37656f4cc0
update uitest and mono_test 2023-12-05 12:45:31 -08:00
Brendan Hansknecht
87b31a581e
roc format 2023-12-05 12:37:12 -08:00