Repository navigation
Commit 64003a8
perf(native): unwrap a transform argument without a second style-function test
argument() unwraps each one-token argument of translate(), scale() and
rotate() with isStyleDescriptorArray, whose isStyleFunction runs
Object.keys, and resolveValue then runs the same test on the token. An
argument is always a compiled descriptor, where only a style function
starts with its {} marker, so an array of one entry that isn't a plain
object is an item, and typeof and Array.isArray tell them apart.
On Hermes (list-bench, against bench), Tailwind's translate-x-4
rotate-45 scale-110 with its variables resolved at runtime goes from
+6.1% to +1.6%.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D4jU1dW7KKQntNrr9i2xGi1 parent e36030c commit 64003a8
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
91 | 95 | | |
92 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
93 | 99 | | |
94 | 100 | | |
0 commit comments