Sable / Ostrich

Benchmark suite for studying the performance of JavaScript and WebCL for numerical computation
Other
24 stars 12 forks source link

bug: setting values out of Uint32Array boundary #42

Open KamilRizatdinov opened 2 years ago

KamilRizatdinov commented 2 years ago

If you have size > 32 you can end up setting values out of the boundary of forbidden = new Uint32Array(32); This operation is useless and bumps time of this specific for-loop from O(const) to O(N)

https://github.com/Sable/Ostrich/blob/dd06ca4340ecdbc0a795274d826cb5c034a2b9fe/branch-and-bound/nqueens/js/nqueens.js#L126