Jump to content

i need this code to execute faster


tastro

Recommended Posts

Sorry, I missed your edit. When I replied you said you couldn't find it on php.net.

 

Basically, it's exponents. For example, pow(2, 2); return 4. pow(4, 4); would return 16.

 

I'd assume pow is just short for "power". So think of it as, 2 to the power of 2; or 4 to the power of 4.

 

 

 

And yes, that one is extremely slow. Didn't test it out until now. :(

It loops through the results as few times as possible.

It doesn't have to perform any array searching (which is pretty much more loops)

The binary helps me figure out what goes where, it's just a method of doing that

The structure is the speed

thank you! ;) it's really awesome. it there a way to do it the same way, but decimal instead of binary? just asking... because it would be easier for me to understand... but if it's not possible then i will learn to understand the binary way. :)

 

i know how to convert decimal to binary and vice versa some nice images here for the ones who doesn't know it yet, but i think that almost all learned it in the high school. http://pad2.whstatic.com/images/4/47/B2d.gif and http://www.wikihow.com/images/5/5a/D2b.gif

someone asked before, for what do i need this?

 

i'm making a search, so that when people enter words into an input (search query)... then if i have all the word combinations of all my posts (titles) then i can just read from my database all posts which match this words.

 

also if someone has an better idea, then please let me know.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.