Source code drop for the Actionscript virtual machine in the Adobe Flash Player for December 2013
23 lines
507 B
ActionScript
23 lines
507 B
ActionScript
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
const NITER:int=5000000; // 20 times less
|
|
|
|
function main():void
|
|
{
|
|
var a:*=1.2;
|
|
var b:*=2.4;
|
|
var c:* = -3.2;
|
|
var fstart:uint = getTimer();
|
|
for(var i:int=0;i<NITER;i++){
|
|
a = b%c;
|
|
c = a%b;
|
|
b = c%a;
|
|
}
|
|
var ftime:uint = getTimer() - fstart;
|
|
trace("metric time ",ftime);
|
|
}
|
|
|
|
main();
|
|
|