I'm guessing the tensorflow.js is pretty bad due to lots of temporary tensors. Although, it uses a convolution operator, and that part is probably relatively good.
Thanks for the demo, clever implementation.
Can anyone think of a way to reduce the number of operators further? Less == and OR operations done after the convolution?