perf(render,wasm): add Order-8 Series Approximation and factor perturbation loops - #96
Merged
Merged
Conversation
|
Visit the preview URL for this PR (updated for commit 602986a): https://fractious-deep--pr96-perf-series-approx-a-ow4olipy.web.app (expires Fri, 02 Oct 2026 15:35:33 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 348393a9746312ebab7a45ce5eba16e6d119af34 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Maximises deep-zoom CPU/WASM and WebGPU rendering throughput while keeping progressive slices responsive on mobile GPUs:
Order-8 Circle-Probed Series Approximation (
wasm/src/lib.rs,src/renderer/shader.wgsl):f64exponent overflow/underflow at arbitrary zoom depths).dot(u_norm, u_norm) <= 1.0) jump directly toi = skip_iter, m = skip_iter(skipping12,584iterations per pixel onz = 17.345), while out-of-disk pixels during large interactive drags seamlessly start at0.Factored Perturbation Recurrence Across All 3 Shader Tiers (
src/renderer/shader.wgsl):qs_sqr,qc_sq,ds_sqr, anddc_sq(~43% fewer multiplications per iteration with identical floating-point accuracy).Precision Tier Threshold & SA-Aware Slice Budgeting (
src/Renderer.js):DS, Double-Single) toz < 21.0(scale > 1.0e-21), since post-rebase squaringskipIterin_effectiveIter(config)for interactive preview and progressive slice budgeting, and updatesopsMultiplier(12.0forDS,8.0forQS) to reflect the factored shaders and avoid single-wavefront 1-row slice traps on tile-based mobile GPUs.Zero-Allocation
f64Quad Splitting & Early Phase-1 Spiral Exit (wasm/src/lib.rs):split_fbig_to_4_f32(12 heap allocations per step) andFBigescape addition inOrbit::advancewith pure stackf64splitting (split_f64_to_4_f32).3 × 3FBigspiral insearch_anchoras soon as a candidate survives past the immediate exterior (score > 16) so Phase 2 surveys the rest of the viewport in fast hardwaref64perturbation.