Commit Graph
18154 Commits
Author SHA1 Message Date
Behdad Esfahbod 4fc694185a [hvgl] Rename "be" var to "le" 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 303cd634f3 [hvgl] Disable unnecessary code 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 9c788d12f1 [hvgl] Comment 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 3d0fae3f5f [hvgl] Optimize initial getting of coordinates 2025-03-02 16:57:54 -07:00
Behdad Esfahbod f31fa0ae9b [hvgl] Optimize extremum transforms some more
Passed the 2x threshold, faster than CoreText.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod e7a05b1b6f [hvgl] Micro-optimize 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 4ba069257d [hvgl] Minor use a variable 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 727b647e1f [hvgl] Speed up transform variations 2025-03-02 16:57:54 -07:00
Behdad Esfahbod be30bf9d74 [hvgl] Simplify master transforms a bit more 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 93ddf8f8af [hvgl] Move variables around 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 49fd66eb4b [hvgl] Split apply_transforms into two loops
The paper says walk them together, but the master can be applied
separately before the extremums.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod 19114e0c0e [hvgl] Micro-optimize transforms
Measurable speedup.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod b7a9f15d54 [hvgl] Simplify transforms
Speeds up a bit too.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod 3a8d6d60ee [hvgl] Iterate all four iterators together
Instead of trying every row, sparsely process non-trivial rows.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod a1fba4ebd4 [hvgl] Micro-optimize 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 8f505a70e3 [hvgl] Speed up simd path
Only process coord!=0 columns.

For some reason I don't see any speedup :-(.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod c111f088cf [hvgl] Simplify sanitize more 2025-03-02 16:57:54 -07:00
Behdad Esfahbod d4600d8ddd [hvgl] Simplify more sanitize 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 41ee17e883 [hvgl] Simplify sanitize 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 4f3c3ee0ea [hvgl/simd] Only enable if little-endian 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 8e7eeb5f7a Revert "[hvgl] Implement AVX"
This reverts commit 82ac479cbb49a88946025be2b84315bfd6091d24.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod e7ecc8e5f7 [hvgl] Implement AVX
Shows like only 2% / 3% speedup. Going to revert.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod 8bd246791e [hvgl] Minor macro def 2025-03-02 16:57:54 -07:00
Behdad Esfahbod c0f8877201 [hvgl] Micro-optimize 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 5013743731 [hvgl] Micro-optimize 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 1e8c858ea7 [hvgl] Rewrite a loop
No functionality change.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod 07a97adb41 [hvgl] Remove an unnecessary check
It's a rare case; no need to check it first.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod 6da4fb10fc [config] Add HB_NO_SIMD 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 2ba20cfe00 [hvgl] Micro-optimization leftover 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 76017d561a [hvgl/simd] Remove unaligned SIMD codepath
The generic path is faster it seems.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod c5e3fb5d12 [hvgl/simd] Reduce alignment requirement
Speeds up a bit.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod 587b167702 [hvgl] Implement Apple SIMD 4x4 matrix usage
Shows around 7% improvement only.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod 6252d435f5 [hvgl] Move code 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 640d778b4f [hvgl] Minor micro-optimize 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 93f0dd97ba [hvgl] Optimize away complex math
Most of the time rotation is zero. It's the same test.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod 25ed2c195e [hvgl] Micro-optimize some more 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 8e21012705 [hvgl] Micro-optimize segment access 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 575a831b33 [hvgl] Micro micro optimize 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 9c99c29259 [hvgl] Micro-optimize apply_transforms() 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 7b72481474 [hvgl] Speed up hot loop 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 4857c58ec0 [hvgl] Fix warning 2025-03-02 16:57:54 -07:00
Behdad Esfahbod c8d7a55b14 [hvgl] Simplify loop for the compiler
Just in case.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod a26a2c916a [algs] Sprinkle some const around hb_packed_t<> casts 2025-03-02 16:57:54 -07:00
Behdad Esfahbod e86bbf5e53 [hvgl] Fix warning 2025-03-02 16:57:54 -07:00
Behdad Esfahbod f37f22baa3 [hvgl] Fix extremum rotations
Solve for eigen vector properly.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod 41ee5988e5 [hvgl] Transforms seem to work now! 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 3711a21ebc [geometry] Clean up angle units 2025-03-02 16:57:54 -07:00
Behdad Esfahbod 460c39d76f [hvgl] Towards correct rotation 2025-03-02 16:57:54 -07:00
Behdad Esfahbod f5461c3b79 [hvgl] Implement transformations
I'm sure it has bugs but seems to work for non-rotation test
I've performed at least.
2025-03-02 16:57:54 -07:00
Behdad Esfahbod b4f26357d9 [hvgl] Starting to implement transforms 2025-03-02 16:57:54 -07:00