Added a C version, and compiled it to Javascript in order to compare the performance of handwritten Javascript VS emscripten-compiled javascript