JIT1

Benchmark created by naugtur on


Description

A test case to see if JIT makes it worth to put often used code in small functions

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/prototype/1/prototype.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/mootools/1.3/mootools-yui-compressed.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/yui/2.9.0/build/yuiloader/yuiloader-min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/dojo/1/dojo/dojo.xd.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/ext-core/3/ext-core.js"></script>

<script>
  var b,a=[1,2,3],
  f=function(){
  return (a[1]/a[2]+a[3]+'qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq'+parseFloat('000000007.324234asdsdfdf'));
  }
  
  
  
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
inline
b=(a[1]/a[2]+a[3]+'qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq'+parseFloat('000000007.324234asdsdfdf'));
 
ready
function call
b=f();
 
ready

Revisions

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

  • Revision 1: published by naugtur on