Skip to content

Conversation

maplant
Copy link
Owner

@maplant maplant commented May 15, 2025

This example works, but is quite slow, so this PR adds it as a benchmark.

This PR also adds a maximum number of pending mutations to the garbage collector, effectively halting runaway memory growth that sometimes occurs with recursive functions. This can probably be tweaked, and shows about a 8% perf regression in the fib benchmark. That's really not a lot, especially considering we'll probably have some more big optimizations in the future that completely erase that regression.

What can improve this benchmark? I think that mostly this is due to having a few functions defined in scheme rather than as Rust builtins. Functions like map should probably be moved to Rust. After that, some analysis of the CPS IR is probably necessary. Maybe I can finally add eta reduction.

@maplant maplant changed the title Runge kutta perf Add runge-kutta R6RS example as benchmark May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant