Math.min vs code

Benchmark created by jiangmiao on


Preparation HTML

<script>
  a = 999;
  b = 888;
  
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Math.abs
y = Math.min(a, b)
ready
code
y = a < b ? a : b;
ready

Revisions

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

  • Revision 1: published by jiangmiao on