You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -16,11 +20,11 @@ var f = pool.malloc(128, "float")
16
20
pool.free(f)
17
21
```
18
22
19
-
##Install
23
+
# Install
20
24
21
25
npm install typedarray-pool
22
26
23
-
##API
27
+
# API
24
28
25
29
```javascript
26
30
var pool =require("typedarray-pool")
@@ -84,7 +88,7 @@ Returns the array back to the pool.
84
88
### `pool.clearCache()`
85
89
Removes all references to cached arrays. Use this when you are done with the pool to return all the cached memory to the garbage collector.
86
90
87
-
##FAQ
91
+
# FAQ
88
92
89
93
### Why cache typed arrays?
90
94
Creating typed arrays is stupidly expensive in most JS engines. So it makes sense to pool them, both so that frequently used typed arrays stay hot in cache and so that you can avoid having to trigger some expensive realloc operation whenever you use them.
0 commit comments