Commit 77745f4
adabot
Automated update by Adabot (adafruit/adabot@2665096)
Updating https://github.com/todbot/CircuitPython_Noise to 1.1 from 1.0.2:
> Update, optimize noise(); add tests and timing example noise.py: - Pre-compute F2, G2, and _G2x2m1 as float literals (removes math.sqrt on import) - Inline floor() via int() + fixup, removing two math.floor calls per invocation - Inline dot() via _gx/_gy tuples, removing 2-3 function calls and Grad attribute lookups per invocation - Cache 7 module globals as locals at function entry (MicroPython global lookup is a dict probe; locals are indexed directly) - Add @Native decorator with ImportError fallback for CPython/CircuitPython - Net result: 0.297 → 0.266 ms/call on RP2040 @ 125 MHz (~10% faster)1 parent a89377f commit 77745f4
0 commit comments