flat assembler
Message board for the users of flat assembler.
Index
> Windows > Disable SMT for my process? Goto page Previous 1, 2, 3, 4, 5, 6, 7 
Author 

revolution
Azu wrote: P.S.: 

04 Sep 2009, 15:47 

Azu
It should be versatile enough to take limitations into account, I think.
For example, you have two algorithms, and neither of them can process over a million elements.. wouldn't it make sense not to calculate past 1 million then? One of them might theoretically scale way better if it goes to infinity, but since that can't happen, your results could be incorrect.. 

04 Sep 2009, 15:50 

revolution
Azu wrote: It should be versatile enough to take limitations into account, I think. 

04 Sep 2009, 15:52 

Azu
revolution wrote:


04 Sep 2009, 15:55 

Borsuc
Azu wrote: P.S.: It does not tell you when X is faster that Y, depending on N. It tells you the relationship of the functions as they increase. Bubble Sort increases quadratically, known fact. That is what BigO tells you, not that it would run slower than quicksort for TWO elements (which is false, it's obviously faster). Also I said before the "upper limits" are conditions imposed in the function, and conditions do not work in mathematics with a single notation. What if you have a function that checks if N is prime (let's say MAGICALLY does so in 1 clock cycle), and if it is, then it does operation X which is O(N^2), otherwise operation Y which is O(N). How would you rate such function's complexity? It is impossible to do it with one BigO notation. You can apply conditions like "if N isn't prime, O(N), otherwise O(N^2)" but that uses two notations as you can see... _________________ Previously known as The_Grey_Beast 

04 Sep 2009, 15:57 

Azu
I used two notations though
I said if N<17 O(1) else O(ceiling(n/16)) P.S. your function does not need magic, it needs huuuuuuuuuuuge LUT. 

04 Sep 2009, 16:00 

revolution
Azu wrote: ... bigP ... 

04 Sep 2009, 16:02 

Borsuc
Correct but in that case, it's like you have two functions. The actual function must have the condition, not just your classification (e.g if you called a different function if N>=17, then it would qualify)
_________________ Previously known as The_Grey_Beast 

04 Sep 2009, 16:02 

revolution
Azu wrote: P.S. your function does not need magic, it needs huuuuuuuuuuuge LUT. 

04 Sep 2009, 16:03 

Borsuc
Unless the huuuuuuuge LUT is in the cache


04 Sep 2009, 16:04 

Azu
Borsuc wrote: Correct but in that case, it's like you have two functions. The actual function must have the condition, not just your classification (e.g if you called a different function if N>=17, then it would qualify) Like this? Code: cmp ecx,16 ja loopz movdqa xmm0,dqword[esi] movdqa xmm1,dqword[edi] paddb xmm0,xmm1 movdqa dqword[edi],xmm0 ret loopz: movdqa xmm0,dqword[esi] movdqa xmm1,dqword[edi] sub ecx,16 paddb xmm0,xmm1 movdqa dqword[edi],xmm0 jns loopz ret revolution wrote:


04 Sep 2009, 16:06 

Goto page Previous 1, 2, 3, 4, 5, 6, 7 < Last Thread  Next Thread > 
Forum Rules:

Copyright © 19992020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.