Nathan Braswell
|
fefae631e2
|
Add java ocaml and swift tests
|
2022-05-19 00:43:27 -04:00 |
|
Nathan Braswell
|
62c0958006
|
Added haskell versions (parameterized by CLI argument)
|
2022-05-18 23:59:18 -04:00 |
|
Nathan Braswell
|
4481784666
|
Update README.md
|
2022-05-18 05:31:43 +00:00 |
|
Nathan Braswell
|
a0c4eb3eaf
|
sigh, accidentally committed .wasm
|
2022-05-18 01:29:23 -04:00 |
|
Nathan Braswell
|
81a54b5a06
|
Old .gitignore actually prevent the kraken versions of the benchmarks from being comitted, scarily enough - also some of the c fib tests
|
2022-05-18 01:28:49 -04:00 |
|
Nathan Braswell
|
34c6d01c31
|
Implement deriv benchmark
|
2022-05-18 01:26:08 -04:00 |
|
Nathan Braswell
|
7fef7eba85
|
Add cfold benchmark - can't go over 5 (though Koka uses 20) because wasm runs out of stack. Not entirely sure how to handle that - I imagine we're emitting far to much on the stack frame, but also I would hope wasmtime would optimize it, and I additionally can't find a way to raise wasmtime's limit from the cli... It is worth noting that Koka notes that cfold is a benchmark that can exhaust the stack
|
2022-05-17 23:34:46 -04:00 |
|
Nathan Braswell
|
e6a1ad5bf3
|
Add nqueens benchmark (new kraken impl, with koka and cpp moved over from koka_bench)
|
2022-05-16 23:00:56 -04:00 |
|
Nathan Braswell
|
5ee4020c2b
|
Update readme to state source of koka_bench and to call out the different license for that directory
|
2022-05-16 02:36:30 -04:00 |
|
Nathan Braswell
|
b1b060292e
|
Moved over first rbtree test from koka_bench and integrated Kraken via compiler wrapper script that calls the partial_evaluator / compiler and then emits a wrapper script that runs the resulting wasm via wasmtime.
|
2022-05-16 02:33:10 -04:00 |
|
Nathan Braswell
|
025ca41c59
|
Add support for command line arguments as a monad
|
2022-05-16 01:35:36 -04:00 |
|
Nathan Braswell
|
8c773fd0d8
|
Add deallocation in TCE for rare-er stuff - our test doesn't actually use it yet
|
2022-05-14 02:20:05 -04:00 |
|
Nathan Braswell
|
8bc092cdeb
|
GAH the matching.kp was using the old broken Y combinator, fixing it makes it work. We're, uh, 682x slower than Koka
|
2022-05-14 01:46:53 -04:00 |
|
Nathan Braswell
|
6683344357
|
Initial implementation of TCE - doesn't properly drop params/locals, and doesn't activate for the RB-Test for some reason, but does run for the long_fact
|
2022-05-12 00:34:19 -04:00 |
|
Nathan Braswell
|
50d68c3424
|
Groundwork for Tail Call Elimination. Prints out when it should happen, but doesn't actually do it
|
2022-05-11 00:59:41 -04:00 |
|
Nathan Braswell
|
20c46af986
|
Merge branch 'master' of github.com:Limvot/kraken
|
2022-05-09 23:42:45 -04:00 |
|
Nathan Braswell
|
a966c0c0ba
|
Using a nice Pure Nix Flake now, implement Koka-style rb-tree test (only running on 100 instead of 42,000,000 - .06s compiled, 40m54s interpreted!!!), also a small fact to test loops - spoiler alert we need tail-call-elimination
|
2022-05-09 23:42:39 -04:00 |
|
Nathan Braswell
|
5369e58eed
|
Update matching.kp
|
2022-05-09 14:35:01 -04:00 |
|
Nathan Braswell
|
20d554dfe6
|
Fixed dropping 0-length arrays, RB-Tree seems to work well now!
|
2022-05-08 19:38:44 -04:00 |
|
Nathan Braswell
|
7e7a7c3b32
|
Merge branch 'master' of github.com:Limvot/kraken
|
2022-05-08 01:34:38 -04:00 |
|
Nathan Braswell
|
8dd28370c1
|
Ported RedBlack-Tree based on our new match. Seems to work, though compiled version crashes on memory-out-of-bounds while interpreted works - will have to debug later
|
2022-05-08 01:34:33 -04:00 |
|
Nathan Braswell
|
746933f21e
|
Update README.md
|
2022-05-07 20:19:18 +00:00 |
|
Nathan Braswell
|
ca68826fbc
|
Clean up and rearrange
|
2022-05-07 16:09:16 -04:00 |
|
Nathan Braswell
|
08c01257f3
|
Add matching on quoted symbols
|
2022-05-07 15:07:03 -04:00 |
|
Nathan Braswell
|
6140a7a006
|
Comment out un-val error message generation, was taking an absurd amount of space in final binary
|
2022-05-07 14:52:32 -04:00 |
|
Nathan Braswell
|
9bb6104952
|
Much more real match with arrays and unquote, also added unquote to parser and made log return its last argument
|
2022-05-06 00:35:31 -04:00 |
|
Nathan Braswell
|
c3b2a852b7
|
Fix debug not being called because of the function index renumbering, add calling debug for calling not a function in eval. For some reason this crashes redebug :/
|
2022-05-03 23:25:56 -04:00 |
|
Nathan Braswell
|
172512f447
|
Fix array inequality case
|
2022-05-03 22:49:50 -04:00 |
|
Nathan Braswell
|
2a6ee6d8e4
|
Fix inlineing se not being set to nil (but default 0 by wasm) so it always equaled 0
|
2022-05-03 22:09:37 -04:00 |
|
Nathan Braswell
|
d420b6491f
|
Fix regression - was using the wrong error when blocking recursion and treating as real error instead of stop recursion fallback
|
2022-04-25 09:19:14 -04:00 |
|
Nathan Braswell
|
223147f699
|
Initial inlining working - fib_let went from .4 something to .138. Suspect the remaining slowdown over fib is extra refcounting calls, but unsure. Compile error on fib_manual, need to see whether it was this change or the earlier find fixes
|
2022-04-25 09:07:42 -04:00 |
|
Nathan Braswell
|
8b3cab7a2f
|
Fix multiple cond/slice bugs revealed by LotusRonin's new find testcase
|
2022-04-24 20:39:51 -04:00 |
|
Nathan Braswell
|
8a876a7b29
|
Merge pull request #6 from Limvot/md5_hash_func
Add 32 bit int to hex string and leftrotate impls. Also some string functions
|
2022-04-23 13:42:22 -04:00 |
|
Nathan Braswell
|
6c51639c6e
|
Thread through inline_symbols and inline_level to prep for inlining impl
|
2022-04-23 01:41:52 -04:00 |
|
Nathan Braswell
|
18250e716f
|
Ah, the remaining calls were to =. Added 'inlining' the = and comp_helper loop into repeated calls to comp_helper_helper, eliminating the param array overhead. Now fib only allocates 10 times (instead of 4 million), and runs in .107s, finally beating Python handilly and becoming about 2x as slow as Chez. Feels like a decent spot for now, and that was most all of the low hanging fruit. The only thing left now is inlining of user functions to get fib_let performing as well - it looks glacial now at .4s because of the 2 remaining closure calls that the let expands to
|
2022-04-21 01:09:10 -04:00 |
|
Marcus "Mark" Godwin
|
1c9944acab
|
Implement some string funcs
|
2022-04-21 00:30:51 -04:00 |
|
Nathan Braswell
|
0cb52eb0b4
|
Add inlining of add and subtract, and now might be beating Python, though not by a statistically significant amount with the number of tests. Fib is still allocating 4 million times or so, which is weird, since +&- should have been the last calls to do so. Time to track that down
|
2022-04-20 23:47:36 -04:00 |
|
Nathan Braswell
|
ec9f8d9d10
|
Implement unwrapped static calls! Modest speedup of 0.50 -> 0.43, I belive because calls to + and - still create the arrays. Still less than expected, though
|
2022-04-20 02:27:22 -04:00 |
|
Nathan Braswell
|
c2dbac67f5
|
Add, and move setup to, wrapper func for each user func. Next need to actually call the non-wrapper version if applicable...
|
2022-04-19 02:00:56 -04:00 |
|
Nathan Braswell
|
5cdaafebe2
|
Change lapply to optionally take in an explicit env, make it optional for vapply so they match, then tweak Y such that it threads the dynamic env through, then implement eta-reduction in the compiler backend. This provides about the same speedup again from the Y elimination, as it's kinda the other half for fully getting rid of Y such that there's just static recursive calls. fib.kp went from 1.7 -> 1.1 -> 0.5, and fib_let similarly. fib.kp is now faster than fib_manual, but just by a bit.
|
2022-04-17 01:52:01 -04:00 |
|
Marcus "Mark" Godwin
|
c259031110
|
Merge branch 'master' into md5_hash_func
|
2022-04-15 00:39:11 -04:00 |
|
Marcus "Mark" Godwin
|
562770baf7
|
Add 32 bit int to hex string and leftrotate impls.
|
2022-04-15 00:35:00 -04:00 |
|
Nathan Braswell
|
3009b62f5e
|
Mostly eliminating Y combinator at compilation time by putting function values in memo early if we have env_val and we put in the anti-recursion hash from the partially evaled call that returned this comb, and then compiling calls also looks for its recursion-stopped hashes in memo. To finish the transformation, I need to perform an Eta-reduction as well, but we've already got over half of the speedup from eliminting the Y part and just leaving (lambda (& y) (lapply <now_const_func!> y)).
|
2022-04-14 02:49:00 -04:00 |
|
Nathan Braswell
|
8b21a6c55e
|
Use hyperfine to benchmark, add builtin_fib as a comparison for how fast we could try to be
|
2022-04-13 00:25:53 -04:00 |
|
Nathan Braswell
|
c6071dbbe1
|
bunch more testcases
|
2022-04-12 00:14:09 -04:00 |
|
Nathan Braswell
|
55afa8977e
|
Add rust example
|
2022-04-11 16:07:11 -04:00 |
|
Nathan Braswell
|
645b9f7172
|
Perhaps over-compilicated attempt to only reify envs when actually necessary. Also got a speedup from simplifying params creation when neither varadic nor uses de, which is really the main speedup here. Hopefully this is still a step forwards that will become more apparent with the removal of reifing params too, and inlining. Might be being foiled by the recursive call going through Y or something. Did see a reduction in allocations with the no-reifying thing, but only from 35mil to 34mil. Seems like it should be more with the number of leaf calls in fib, not sure whats up. Maybe there's more overhead going through Y than I thought and its all of that?
|
2022-04-11 02:17:17 -04:00 |
|
Nathan Braswell
|
d92f774c33
|
Add help message based on Marcus's suggestion
|
2022-04-10 10:45:52 -04:00 |
|
Nathan Braswell
|
1149363e62
|
Add debug_levels and turn off stack_traces by default, but save enough info about the last interaction with the top-level loop to enable re-running to problem spot with debugging on if it happens, and it works! This is the first step towards the opt/non-opt-wrap work while maintaining debugability
|
2022-04-09 00:45:58 -04:00 |
|
Nathan Braswell
|
7116012be1
|
Better debug parameter message
|
2022-04-06 00:24:34 -04:00 |
|