Folkert
b9b19d6054
fix for bugged setjmp/longjmp on windows/llvm
2024-01-07 23:04:11 +01:00
Bryce Miller
a710dd18ac
Merge branch 'main' into list-walk-with-index-until
2023-12-18 17:25:06 +01:00
Sahil Mahapatra
b2ceeb47d9
removed all the mentions of Num.format
2023-12-13 18:51:01 +05:30
Bryce Miller
2db4cae9d1
Merge branch 'main' into list-walk-with-index-until
2023-12-12 07:54:42 -05:00
Bryce Miller
89febf52bc
Merge branch 'main' into list-walk-with-index-until
2023-12-11 23:13:21 -05:00
Bryce Miller
59eb28ef58
Add builtin List.walkWithIndexUntil
2023-12-11 23:04:40 -05:00
Brendan Hansknecht
0e842fd844
update formatting, uitest, and mono_test
2023-12-11 18:22:53 -08:00
Brendan Hansknecht
65ce79c1c5
correct Dict.update to use proper index
2023-12-11 15:35:19 -08: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
f262102299
cleanup list and str builtin naming from refcount to allocation
2023-12-10 19:52:28 -08:00
Brendan Hansknecht
b39d604745
Dict follow up and addition of releaseExcessCapacity
2023-12-10 00:06:58 -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
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
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
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
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
a2cc17e8e9
write keepShared in a way that doesn't break dev-wasm
2023-12-05 14:12:10 -08:00
Brendan Hansknecht
87b31a581e
roc format
2023-12-05 12:37:12 -08:00
Brendan Hansknecht
3f50f78eba
update tests and Dict.keepShared semantics
2023-12-05 12:37:12 -08:00
Brendan Hansknecht
a0854a10e7
optimize set intersection and union
2023-12-05 12:37:12 -08:00
Brendan Hansknecht
35146d1a0b
remove redundant size attribute
2023-12-05 12:37:11 -08:00
Brendan Hansknecht
b9ef582c26
correct size to avoid rehash
2023-12-05 12:37:11 -08:00
Brendan Hansknecht
7e04c1f58c
use constants to avoid new allocations in Dict.empty
2023-12-05 12:37:11 -08:00
Brendan Hansknecht
f31a4070e4
implement Dict.withCapacity and improve Dict.fromList
2023-12-05 12:37:11 -08:00
Brendan Hansknecht
6692f5b15d
correct counting bits to return a u8
...
Also add an impl to the dev backend
2023-12-05 12:37:10 -08:00
Brendan Hansknecht
e336aa525c
Merge pull request #6062 from JRMurr/div-0-should-crash
...
Update zig `@panic` calls to `roc_panic` for numeric errors
2023-12-05 12:28:47 -08:00
Anton-4
a57f29e780
Merge pull request #6184 from roc-lang/debug-info
...
Fix debug info
2023-12-05 14:03:52 +01:00
LoipesMas
00839e12b5
Run roc format
2023-12-05 00:24:08 +01:00
LoipesMas
d4a8208069
Add more test cases
2023-12-05 00:04:13 +01:00
LoipesMas
83ac8209ae
Add Dict.keepIf, Dict.dropIf, Set.keepIf, Set.dropIf
2023-12-04 23:38:51 +01:00
Brendan Hansknecht
034b86973b
keep stripping zig debug info to avoid 250ms cost
2023-12-04 13:38:25 -08:00
Brendan Hansknecht
496cd6710a
fix debug info and add it all to the llvm backend
2023-12-04 12:55:33 -08:00
Becker A
82ed520b98
Update Num.roc
...
undid bad change
Signed-off-by: Becker A. <awqatty.b@gmail.com>
2023-12-04 10:56:29 -07:00
Becker A
88d9d2d81b
Update Num.roc
...
fixed docstring typos
Signed-off-by: Becker A. <awqatty.b@gmail.com>
2023-12-04 10:55:26 -07:00
Becker A
f420e518d5
Update Num.roc
...
fixed docstring typo
Signed-off-by: Becker A. <awqatty.b@gmail.com>
2023-12-04 10:54:17 -07:00
Becker A
779b948772
Update Num.roc
...
fixed typos
Signed-off-by: Becker A. <awqatty.b@gmail.com>
2023-12-04 10:46:55 -07:00
Brendan Hansknecht
e5a0af5699
make DbgFormatter an unexposed implementation detail
2023-12-03 12:41:04 -08:00
Brendan Hansknecht
787d7f85ac
switch dbg arg ordering to make it backwards compatible
2023-12-02 21:18:32 -08:00
Brendan Hansknecht
6c60da2832
add dbg impl for use with roc test
2023-12-02 21:18:32 -08:00
Brendan Hansknecht
13d2238536
update roc_dbg in platforms
2023-12-02 21:18:31 -08:00