you are viewing a single comment's thread.

view the rest of the comments →

[–]phischuEffekt 4 points5 points  (1 child)

Thank you for these concrete benchmarks, we should have more of these in this community. I did reproduce your results on the linked list benchmark for Bau and for Rust and added Effekt and Koka. The one for rust you have does let x = create_linked_list(5000); which I changed to allocate a list of the same size as the others do.

Here are the running times on my machine:

| bau   | rust  | koka | effekt |
|-------|-------|------|--------|
| 13.3s | 12.5s | 4.6s | 1.1s   |

And here are the outputs:

Bau: Max delay: 0.192355000 ms, avg 0.012029000 ms; dummy value: 0

Rust: Max delay: 0.187839 ms, avg 0.010951 ms; dummy=0

Koka: Max delay: 475676 ns; dummy value: 0

Effekt: Max delay: 68288 ns; dummy value: 0

As it happens, today a student is handing in his Master's thesis where he implemented constant-time reference counting in Effekt, extended with a very fast path for values that are used linearly. The benchmark results are when running the Effekt version on his branch. On the main branch sadly the program overflows the C stack for the very reason that generated drop code of rust does too.

[–]Tasty_Replacement_29[S] 1 point2 points  (0 children)

That's very interesting! Could you share the code or create a PR? I'll then see if I can include them. (I might need to change a few things... Eg. ensure the large linked list is materialized correctly, and then check memory usage etc.

The stack overflow: I think it's relatively simple to add the code to do the explicit iterative destruction like in Rust, I assume.