Repository navigation
Conversation
dfee107 to
a08fb01
Compare
a08fb01 to
7d52df4
Compare
|
Thanks for the optimisation and the benchmark numbers. One portability fix before merging: Non-blocking: the new right-identity shortcut bypasses multiplication, so it preserves non-finite entries instead of propagating NaNs through |
Use NEON to multiply and compare Fabric's 4×4 transform matrices on arm64. Keep the scalar implementation on other architectures and with MSVC, which declares its NEON intrinsics in `<arm64_neon.h>`. Preserve how matrix equality treats signed zero and NaN. During composition, reserve space for both operation lists before copying them in concatenation order. An identity on either side returns the other transform unchanged. The C++ `TransformTest` suite passes. The new cases check signed zero and NaN in matrix equality, that an identity on either side keeps infinite entries, and the order of composing transforms across three axes. In an optimized C++ benchmark on Apple M6, the median falls from 59.03 to 28.53 retired instructions per equality comparison and from 1,255.42 to 450.21 per composition. `proc_pid_rusage` counts instructions across five interleaved runs. The output checksums match. Signed-off-by: James Ide <ide@expo.dev>
7d52df4 to
e9fcab3
Compare
|
Thanks. Done in e9fcab3: the NEON code is now guarded by |
Summary:
Use NEON to multiply and compare Fabric's 4×4 transform matrices on arm64. Keep the scalar implementation on other architectures and with MSVC, which declares its NEON intrinsics in
<arm64_neon.h>. Preserve how matrix equality treats signed zero and NaN. During composition, reserve space for both operation lists before copying them in concatenation order. An identity on either side returns the other transform unchanged.Changelog:
[INTERNAL] [CHANGED] - Vectorize Fabric transform operations on arm64.
Test Plan:
The C++
TransformTestsuite passes. The new cases check signed zero and NaN in matrix equality, that an identity on either side keeps infinite entries, and the order of composing transforms across three axes.In an optimized C++ benchmark on Apple M6, the median falls from 59.03 to 28.53 retired instructions per equality comparison and from 1,255.42 to 450.21 per composition.
proc_pid_rusagecounts instructions across five interleaved runs. The output checksums match.