Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
I don't think there's a way to change this math to work without taking the square root to get `distance`. It's possible that there is a way to change that to work with the squared forms, but I don't grasp the actual math going on well enough to determine that unfortunately.
Looking at the perf metrics for the full function's disassembly[2], square root-related instructions only account for a tiny amount of the program's runtime anyway.
That all being said, thank you so much for taking the time to read the post closely enough to come up with this idea!
[1] https://github.com/Ameobea/webcola-wasm/blob/master/src/wasm...
super cool!
i've done my share of optimizations and benchmarking charting libs [1] but this goes deeper still.
SVG is not a good choice for large raw datasets when you need performance.
Related posts
- Small and fast 2D canvas chart for time series, lines, areas and bars
- JS library for graphing huge amounts of data
- [task] Program uplot support into node-red-dashboard (javascript)
- React pattern for very fast data fetching and rendering?
- How can I build this? A scrolling navigator that pans across the main view?