realtable / surreal

A Rust library that implements Conway's surreal numbers
MIT License
3 stars 0 forks source link

Advice: Add some words on performance #1

Open saona-raimundo opened 4 years ago

saona-raimundo commented 4 years ago

Thank you for this crate!!

I wanted to propose to add some words about the performance of the computations and why it is so, especially about multiplication and addition. And maybe pointing out other implementations.

The following paper shows an implementation in Julia and compares with others, in Haskell for example.

I tried to compute "3 times 4" and "30 plus 40" on my computer, but it could not handle it.

Cheers!

realtable commented 4 years ago

Sorry it took so long to respond. I've been busy lately with school, so I've haven't really had a lot of time to work on this. However, now that I do have a little time, I should have something ready to push to this repo in the next week or so that you can check out.

I'm working on implementing the DAG method described in that paper (thank you, very helpful!). This turns out to be a really good improvement. For example, the float to surreal conversion algorithm, which previously only worked for numbers up until day 5, now works for numbers up to day 8192 with similar performance.

saona-raimundo commented 4 years ago

Thank you!! I am glad to hear from you :D