Created
January 13, 2016 14:16
-
-
Save Gnimuc/e01cd9423bb0a0f66c24 to your computer and use it in GitHub Desktop.
[SO]Julia vs MATLAB: Why is my Julia code so slow?
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 characters
| using Dierckx | |
| function foo() | |
| x = [0., 1., 2., 3., 4.] | |
| y = [-1., 0., 7., 26., 63.] | |
| spl = Spline1D(x, y) | |
| a = evaluate(spl, ones(10000)) | |
| reshape(a,100,100) | |
| end | |
| function bar() | |
| for i=1:1000 | |
| foo() | |
| end | |
| end | |
| @time bar() |
Gnimuc
commented
Jan 13, 2016
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment