Commit cf7e4889 authored by Marc Duez's avatar Marc Duez

model.js : remove old fast root approximation

parent fcc60e42
......@@ -1938,42 +1938,3 @@ function return_URL_CGI() {
var rootTab = []
function root(n) {
var startTime = new Date()
.getTime();
var elapsedTime = 0;
for (var i=0; i<n; i++){
var dx = 5
var dy = 5+1
rootTab[i] = Math.sqrt( dx*dx + dy*dy )
}
elapsedTime = new Date()
.getTime() - startTime;
myConsole.log("root("+n+") : " + elapsedTime);
}
function root2(n) {
var startTime = new Date()
.getTime();
var elapsedTime = 0;
for (var i=0; i<n; i++){
var dx = Math.abs(5)
var dy = Math.abs(5+1)
var min = Math.min(dx,dy)
rootTab[i] = dx + dy - (min >> 1) - (min >> 2) + (min >> 4)
}
elapsedTime = new Date()
.getTime() - startTime;
myConsole.log("root2("+n+") : " + elapsedTime);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment