This repository was archived by the owner on Oct 15, 2020. It is now read-only.
Commit 43125ad
committed
chakrashim: Avoid calling JsCopyString twice to find length
To find Utf8Length, we call `JsCopyString()` to find the length
of utf8 string and then another call to actually perform the copy
into the buffer. 2nd call is not needed for just finding length.
Gives approx. 2% win in acme-air on my machine.1 parent 92eb561 commit 43125ad
3 files changed
+22
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
976 | 976 | | |
977 | 977 | | |
978 | 978 | | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
979 | 989 | | |
980 | 990 | | |
981 | 991 | | |
982 | | - | |
983 | | - | |
| 992 | + | |
| 993 | + | |
984 | 994 | | |
985 | 995 | | |
986 | 996 | | |
987 | 997 | | |
988 | 998 | | |
989 | | - | |
| 999 | + | |
990 | 1000 | | |
991 | | - | |
992 | | - | |
993 | | - | |
994 | | - | |
995 | | - | |
996 | | - | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
997 | 1005 | | |
998 | | - | |
| 1006 | + | |
999 | 1007 | | |
1000 | 1008 | | |
1001 | 1009 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
| |||
0 commit comments