-
-
Save IshanArya/55743f73a0892f19373986ff1dff951c to your computer and use it in GitHub Desktop.
Revisions
-
IshanArya revised this gist
Jun 1, 2020 . 2 changed files with 12 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ import "math" func intenseFunc(n int) int { var result float64 = 0 v := float64(n) for i := math.Pow(v, 7); i >= 0; i-- { u := float64(i) result += math.Atan(u) * math.Tan(u) } return int(result) } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +0,0 @@ -
sorenlouv revised this gist
Feb 20, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,4 +7,4 @@ function mySlowFunction(baseNumber) { console.timeEnd('mySlowFunction'); } mySlowFunction(8); // higher number => more iterations => slower -
sorenlouv revised this gist
Jan 30, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,4 +7,4 @@ function mySlowFunction(baseNumber) { console.timeEnd('mySlowFunction'); } mySlowFunction(3); // higher number => more iterations => slower -
sorenlouv revised this gist
Jan 30, 2019 . No changes.There are no files selected for viewing
-
sorenlouv revised this gist
Jan 30, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ function mySlowFunction(baseNumber) { console.time('mySlowFunction'); let result = 0; for (var i = Math.pow(baseNumber, 7); i >= 0; i--) { result += Math.atan(i) * Math.tan(i); }; console.timeEnd('mySlowFunction'); -
sorenlouv revised this gist
Jan 30, 2019 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,6 @@ function mySlowFunction(baseNumber) { result += Math.atan(i) * Math.tan(i); }; console.timeEnd('mySlowFunction'); } mySlowFunction(3); -
sorenlouv revised this gist
Jan 30, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ function mySlowFunction(baseNumber) { console.time('mySlowFunction'); let result = 0; for (var i = Math.pow(baseNumber, 10); i >= 0; i--) { result += Math.atan(i) * Math.tan(i); }; -
sorenlouv revised this gist
Dec 11, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ function mySlowFunction(baseNumber) { console.time('mySlowFunction'); var result = 0; for (var i = Math.pow(baseNumber, 10); i >= 0; i--) { -
sorenlouv revised this gist
Oct 24, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,11 @@ var mySlowFunction = function(baseNumber) { console.time('mySlowFunction'); var result = 0; for (var i = Math.pow(baseNumber, 10); i >= 0; i--) { result += Math.atan(i) * Math.tan(i); }; console.timeEnd('mySlowFunction'); return result; } mySlowFunction(3); -
sorenlouv revised this gist
Oct 24, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,5 +7,5 @@ var mySlowFunction = function(baseNumber) { } console.time('mySlowFunction'); mySlowFunction(4); console.timeEnd('mySlowFunction'); -
sorenlouv revised this gist
Oct 24, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,11 @@ var mySlowFunction = function(baseNumber) { var result = 0; for (var i = Math.pow(baseNumber, 10); i >= 0; i--) { result += Math.atan(i) * Math.tan(i); }; return result; } console.time('mySlowFunction'); mySlowFunction(3); console.timeEnd('mySlowFunction'); -
sorenlouv created this gist
Oct 24, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ var myRecursive = function(baseNumber) { var result = 0; for (var i = Math.pow(baseNumber, 10); i >= 0; i--) { result += Math.atan(i) * Math.tan(i); }; return result; } console.time('myRecursive'); myRecursive(3); console.timeEnd('myRecursive');