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
{{ message }}
This repository was archived by the owner on Jul 5, 2020. It is now read-only.
Hi, perhaps it's me not understanding how to use turbo.js, but I have the following test program, which produces an array of size 256, whereas I would expect it to produce an array of size 16 by reading (perhaps in a wrong way) the docs. Indeed that's because in "alloc" there is a line reading "data: new Float32Array(ns * 16)", and the values of sz and ns are the same when sz is a power of two. Could you clarify or maybe this is actually a bug?
let k = 16
var input = turbojs.alloc(k)
var t0 = window.performance.now()
for (let i = 0; i < k; i++) input.data[i] = i
var t1 = window.performance.now()
console.log(t1 - t0)
t0 = window.performance.now()
turbojs.run(input, `
void main(void) {
commit(read());
}
`)
t1 = window.performance.now()
console.log(t1 - t0)
}
console.log(input.data)
Hi, perhaps it's me not understanding how to use turbo.js, but I have the following test program, which produces an array of size 256, whereas I would expect it to produce an array of size 16 by reading (perhaps in a wrong way) the docs. Indeed that's because in "alloc" there is a line reading "data: new Float32Array(ns * 16)", and the values of sz and ns are the same when sz is a power of two. Could you clarify or maybe this is actually a bug?