Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Learn Big O ITT

Name: Anonymous 2015-04-29 14:44

* O(2^n) very very slow
* O(n^2) pretty slow...
* O(n log n) nice and efficient
* O(n) very fast
* O(1) instant

Name: Anonymous 2015-04-29 15:06

O(1) is not instant.

It could take a year for O(1) algorithm where O(2^n) algorithm could take milliseconds.

Name: Anonymous 2015-04-29 15:17

It has to do with scaling and at what threshold does n start being considered large enough to matter.

Name: Anonymous 2015-04-29 15:27

In real life, n doesn't approach infinity.

Name: Anonymous 2015-04-29 15:42

>>2
>>3
>>4
theoreticians

>>1
engineer

Name: >>3 2015-04-29 15:45

>>5
Wrong, I'm an engineer.

Name: Anonymous 2015-04-29 16:05

>>5
Optimise your quotes, 「下さい」.

Name: Anonymous 2015-04-29 18:54

>>7
shit off with your shitmeme

Name: Anonymous 2015-04-29 19:58

Leart about performance here:

Next, on my local programming IRC channel, I shared a little trick I’d seen on Twitter for replacing a div with a shift: (i+1)%3 == (1<<i)&3 for i in [0, 2]. One person strenuously objected to the idea of using this trick. Paraphrasing, their argument went something like "the meaning of the code is not clear, so tricks like that should be left to the compiler, but it doesn’t work for all values of i, so a compiler would never actually substitute the left for the right. Just don’t bother."

http://chadaustin.me/2015/04/thinking-about-performance/

Truly Expert.

Name: Anonymous 2015-04-29 20:31

>>9
That's a rather common ``trick'' if you have any assembly experience whatsoever.

Name: Anonymous 2015-04-29 20:39

>>10
But it's one you just shouldn't bother with!

Name: Anonymous 2015-04-30 2:09

having a fight and falling out with someone on IRC over being wrong about an abosolute worthless microoptimization "trick" that the compiler does for you

#justprogrammerthings

Name: Anonymous 2015-04-30 2:10

>>12
Whom are you quoting?

Name: Anonymous 2015-04-30 2:32

>>13
back to jp with you

Name: Anonymous 2015-04-30 3:17

>>14
What is a ``jp''?

Name: Anonymous 2015-04-30 13:05

>>14
Back to /g/ with your epic >memes.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List