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())) ENDIt uses no loops so that means it's good. Requires advanced sound processing unit.
super search
Root / Submissions / [.]
12Me21Created:
This array searching algorithm is better than all the others
Just buy the DLC. It can be ridiculously useful if you can figure out how to use and abuse it.
the joke
It'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.when ToadIsTheBest says something is bad xddddddddddddddd
Replying to:Yolkai
the joke
It'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 joke
It'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.