Re:A binary tree of all Pythagorean triples
by akomtu on Thursday November 21, 2024 @03:59PM
(#42208591)
A simple trick to solve nearly all freezing problems: move the computations to a background thread, aka Worker in JS terms.
Re:A binary tree of all Pythagorean triples
by aabhay on Thursday November 21, 2024 @09:48PM
(#42210708)
Another trick — use comlink (https://github.com/GoogleChromeLabs/comlink) to make the worker thread into essentially an async API of your local methods.
The JavaScript of this page does a lot of number crunching.
It is actually doing arithmetic on the Stern-Brocot tree. It is all written in ClojureScript and not really optimized yet. I mention in the paper that I do not even use TCO.
Anyway, thank you - and all the people here - for the kind words! I am so happy that my article was so well received today.