Commit graph

3 commits

Author SHA1 Message Date
Ryan Oldenburg 1bf21392b9 fix 2021-10-11 21:04:18 -05:00
treeform f711a5ff6d
Add Swizzle to all Vecs. (#39)
* Add swizzle based on macro.
* More constructors.
* Make it work with shady.
* Morepretty.
* Add ray tracer output.
* Better typePrefix that works with all vector layouts.
2021-07-12 20:07:40 -07:00
treeform 6db149a2be
Add 3 different vector/matrix representations. (#32)
* Add -d:vmathArrayBased to go to array vectors (slow).
* Add -d:vmathObjBased to go to object vectors (faster).
* Add default or just add -d:vmathObjArrayBased to go to object-array vectors (fastest).

Current speed test (using pixie, your results may vary):
```
nim c -r -d:release -d:vmathArrayBased .\tests\benchmark_svg.nim
svg decode ........................ 31.543 ms     38.110 ms    ±5.531  x1000

nim c -r -d:release -d:vmathObjBased .\tests\benchmark_svg.nim
svg decode ........................ 25.620 ms     33.569 ms    ±6.328  x1000

nim c -r -d:release .\tests\benchmark_svg.nim
svg decode ........................ 25.746 ms     33.059 ms    ±5.666  x1000
```
2021-05-08 11:00:29 -07:00