Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
squash! Vector2: Use __slots__ to reserve space rather than use a dic…
…tionary Comparison with master as of caa4ef0: $ python3 -m perf compare_to benchmark_*.json --table +-----------+------------------+------------------------------+ | Benchmark | benchmark_master | benchmark_slots | +===========+==================+==============================+ | __add__ | 4.83 us | 2.49 us: 1.94x faster (-48%) | +-----------+------------------+------------------------------+ | __eq__ | 914 ns | 495 ns: 1.85x faster (-46%) | +-----------+------------------+------------------------------+ | convert | 468 ns | 326 ns: 1.44x faster (-30%) | +-----------+------------------+------------------------------+ | normalize | 9.45 us | 5.81 us: 1.63x faster (-39%) | +-----------+------------------+------------------------------+ | length | 451 ns | 662 ns: 1.47x slower (+47%) | +-----------+------------------+------------------------------+ | rotate | 4.20 us | 6.56 us: 1.56x slower (+56%) | +-----------+------------------+------------------------------+ | scale_by | 2.11 us | 1.58 us: 1.33x faster (-25%) | +-----------+------------------+------------------------------+ | scale_to | 5.10 us | 7.08 us: 1.39x slower (+39%) | +-----------+------------------+------------------------------+ Not significant (7): __sub__; reflect; angle; dot; isclose; __neg__; truncate
- Loading branch information