[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

How the FUCK? A loop on an array with a million elements in an

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 33
Thread images: 4

File: Julia_prog_language.svg.png (47KB, 1280x865px) Image search: [Google]
Julia_prog_language.svg.png
47KB, 1280x865px
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
end


x = 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?
>>
File: 1477032344410.jpg (107KB, 1280x720px) Image search: [Google]
1477032344410.jpg
107KB, 1280x720px
>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/
>>
File: lua[1].gif (5KB, 256x255px) Image search: [Google]
lua[1].gif
5KB, 256x255px
>>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.
>>
File: result.png (1KB, 374x47px) Image search: [Google]
result.png
1KB, 374x47px
>>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..
Thread posts: 33
Thread images: 4


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.