LoginLogin

super search

Root / Submissions / [.]

12Me21Created:
This array searching algorithm is better than all the others
DEF FIND(IN[],VALUE)
 VAR S=2<<CEIL(LOG(LEN(IN),2))
 DIM A[S],B[S]
 B[1]=-1
 IFFT A,A,A,B
 DIM DIFF[LEN(IN)]
 ARYOP #AOPSUB,DIFF,IN,VALUE
 ARYOP #AOPMUL,DIFF,DIFF,DIFF
 SORT DIFF,A
 IF DIFF[0] THEN RETURN -1
 RETURN ROUND(ACOS(-A[0])*S/(2*PI()))
END
It uses no loops so that means it's good. Requires advanced sound processing unit.

needs less loops

Replying to:chicken
needs less loops
*fewer

Replying to:chicken
needs less loops
moren't

Requires the DLC so itโ€™s bad

Replying to:chicken
needs less loops
works only on number arrays

Replying to:IAmRalsei
Requires the DLC so itโ€™s bad
Just buy the DLC. It can be ridiculously useful if you can figure out how to use and abuse it.

the jokeIt's ten times slower than a normal search, according to 12. obviously it's a parody of "faster looping," which despite mentioning loops in general is a search algorithm although that claims 25% fasts by starting in the middle and diverging (i.e. reducing total FOR cycles to n/2), no data is provided here total FOR cycles are reduced to 0 ...but only if your understanding of complexity theory is very shallow.

Replying to:IAmRalsei
Requires the DLC so itโ€™s bad
when ToadIsTheBest says something is bad xddddddddddddddd

Replying to:Yolkai
the jokeIt's ten times slower than a normal search, according to 12. obviously it's a parody of "faster looping," which despite mentioning loops in general is a search algorithm although that claims 25% fasts by starting in the middle and diverging (i.e. reducing total FOR cycles to n/2), no data is provided here total FOR cycles are reduced to 0 ...but only if your understanding of complexity theory is very shallow.
it actually has some weird behavior, though. at one point of time it was 75% faster, then 25% faster, then 0% faster. it is only useful on smaller arrays(or bigger I don't know)

Replying to:Yolkai
the jokeIt's ten times slower than a normal search, according to 12. obviously it's a parody of "faster looping," which despite mentioning loops in general is a search algorithm although that claims 25% fasts by starting in the middle and diverging (i.e. reducing total FOR cycles to n/2), no data is provided here total FOR cycles are reduced to 0 ...but only if your understanding of complexity theory is very shallow.
The function itself isn't a joke, but the page is.

Replying to:IAmRalsei
Requires the DLC so itโ€™s bad
I already have the DLC, R3C0RD