Commit b2761b5
LibJS: Avoid redundant ByteBuffer in Uint8Array.fromBase64()
Since we already have a ByteBuffer from decoding the Base64 data, we can
pass that when creating a new ArrayBuffer.
This avoids a buffer allocation + memory clear + memory copy.1 parent c9c98a1 commit b2761b5
1 file changed
+4
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | 118 | | |
124 | 119 | | |
125 | | - | |
| 120 | + | |
| 121 | + | |
126 | 122 | | |
127 | | - | |
128 | | - | |
| 123 | + | |
| 124 | + | |
129 | 125 | | |
130 | 126 | | |
131 | 127 | | |
| |||
0 commit comments