D
Deno

help

Uint8Array or Float32Array

NNeTT5/23/2023
Is there any significant difference between using a Float32Array and using a Uint8Array from the same buffer for FFI?
AAapoAlas5/23/2023
Yeah. V8's Fast API requires us to choose some buffer type. We've chosen Uint8Array. Thus, using Uint8Array gives your code possibility to use Fast API. Using Float32Array will not take the fast API path. This means going from ~8ns per call to perhaps 20-40ns per call.
NNeTT5/23/2023
Oh I get it now Thanks!

Looking for more? Join the community!