Unlock custom brushes, natural fill effects and intuitive hatching in p5.js
Commits on main
Add movepos_ms to benchmark (Position.movePos hot path). New baseline with 7 metrics: total_ms ~28ms
d9f0b61 acamposuribe committed 8 months ago
Inline pressure() and angle() in Plot: remove curving() overhead, skip wrap-around check for pressure. plot_ms: 5.7→5.5ms. total: 23.2→22.8ms (-2%)
949618d acamposuribe committed 8 months ago
scanlineHatch: flat typed array buffers (no 200 small allocs), skip redundant trig, skip gradient mult when not needed. hatch_ms: 4.7→3.4ms (-27%). total: 23.7→23.2ms (-2%)
56cb43e acamposuribe committed 8 months ago
angleToIdx: avoid % modulo for common range [-360,720). trig_ms: 6.2→5.2ms (-17%). total: 24.8→23.7ms (-4.5%)
7c00241 acamposuribe committed 8 months ago
Pre-warm trig lookup table at module load. Eliminates isNaN check + lazy store overhead. total: 25.3→24.8ms (-2%)
2772809 acamposuribe committed 8 months ago
Plot.calcIndex: binary search O(log n) + incremental length. plot_ms: 10.7 → 5.7ms (-47%). total: 30.3 → 25.3ms (-17%)
27f2b7c acamposuribe committed 8 months ago
Baseline: total_ms=30.3ms. plot_ms dominates at ~35%. Tests pass.
391e95c acamposuribe committed 8 months ago