How the FUCK?
A loop on an array with a million elements in an interpreted language?
Julia is crazy. This KILL Python and R.function foo(a::Array)
s = 0.0
for i = 1:lenght(a)
end
endx = rand(10^6)@time foo(x)
0.000001 seconds (4 allocations: 160 bytes)
>>57170474
What are you talking about?
>>57170468
>do nothing 100000 times
>finishes instantly
WOW
>>57170493
Try in Python faggot.
>>57170493
>do nothing 100000 times
>finishes instantly
Don't you see? That's exactly why it's impressive.
>>57170503
What is the point here? That your esoteric language is better at DOING NOTHING than python? Congrats!
>>57170513
>Julia
>esoteric language
length**
>>57170487
>What are you talking about?
Something he doesn't know much about, apparently.
>>57170533
Is that your best?
>mfw Julia is taking over
>>57170468
typo: "lenght"
>>57170503
so python doesnt have as smart dead code prevention, so what.
>>57170560
Try in R. Try in Ruby. Try in PHP. Try in Javascript. Try in any interpreted programming langage.
>>57170468
>4 allocations
dumb shit
>>57170571
it doesnt fucking matter, its not doing any real work here, have it populate the array0 with fibonacci numbers if you want a fair comparison.
Julia sounds like a entery level dildo
>>57170583
sounds like your own word association baggage there...
>>57170468
Isn't this pajeet language?
>>57170641
Is MIT CSAIL Pajeet?
>>57170468
I tried Julia once and did not find any package that wasn't completely broken.
>>57171009
/welcome to g/
>>57170468
>Julia
Lua says hi. Also tells you to go KYS
>>57171084
LuaJIT is shit f.am
>>57170571
As soon as you use for loops in R, you have failed to grasp what the idea is with the language.
We all know for loops in R is bad. It is slow and causes memory leaks, but there is still a lot of people who use it.
Because it is not meant to replace a programming language
>>57171099
nice hot take
>>57170468
It's called Just In Time compilation.
>>57170468
Uhm... OK?require 'benchmark'
def whoawhoa(a)
s = 0.0
a.each.lazy { }
end
a = *(1..999999)
Benchmark.bm do |bm|
bm.report { whoawhoa a }
end
>>57171296
dead code elimination
>>57170571
>Try in Ruby.
And Ruby delivered:
>>57171296
>>57170503
I just tried, it took a lot of time.
Then I had it actually do stuff, it took the exact same amount of time.
Then I went through the trouble of getting this retarded meme language and have it actually do something: it took longer than Python.
So here's the bottom line:
>I know how to actually code and don't write functions that waste CPU cycles or RAM for FUCKING NOTHING
Use Python, Perl, Ruby, C, C++, C#, Java, Ada, Haskell...
>I'm a fucking retard
Use Julia, node.js, Go, or whatever meme language is the hypest at the moment, and go fuck yourself far, far away from here.
>>57170468
>Julia is crazy.
No, I'm not..
>>57171577
I'm sorry but.. the reason we didnt tell you before was we werent sure how you would react..