Vector2.clone()
performance hit for x86-64 and ARM64? [MOVED]
#55542
Labels
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
P3
A lower priority bug or feature request
triaged
Issue has been triaged by sub team
type-performance
Issue relates to performance or code size
Hello! I'm experiencing a pretty heavy performance hit with
Vector2.clone()
on ARM64 (M3) and x86-64 in Dart 3.3.3 on macOS/Windows. This is a continuation of google/vector_math.dart#319, which was misplaced.Example benchmark:
AOT:
For comparison, the same benchmark loop with a custom
PointDouble(i, j) + PointDouble(j, i)
completes in 9000 us. Only creating and cloning aVector2
is 15-20x slower than creating twoPointDouble
and adding them to form a third.It could be completely unrelated, but the other day I observed another heavy performance hit for the
double
implementation ofi.remainder(j)
which seems to occur across different platforms: #55479.The text was updated successfully, but these errors were encountered: