negative modulo (v14)

Revision 14 of this benchmark created on


Preparation HTML

<script>
var Foobar = function(){};
Foobar.prototype._num = 123;
Foobar.prototype.mod = function (n) {
	return ((this._num % n) + n) % n;
};
var foobar = new Foobar();

function mmod(m, n) {
	return ((m % n) + n) % n;
}
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
modulo prototype
foobar.mod(26);
ready
non prototype
mmod(123, 26);
ready

Revisions

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