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. :(

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.