negative modulo (v12)

Revision 12 of this benchmark created by Kai Schroeder on


Preparation HTML

<script>
Application = {};
Application.Utils = {};

Application.Utils.mod = function (m, n) {
	return ((m % n) + n) % n;
}

function mmod(n, m) {
	return ((m % n) + n) % n;
}

var n = 123;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
modulo prototype
Application.Utils.mod(n, 26);
ready
non prototype
mmod(n, 26);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.