Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End PHP Power vs. Database Lookup

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #43789
    AlCapone
    Participant

    Hi,

    For example, if I wanted the outcomes to some fairly complex mathematical answers at what what point does php’s power become slower than it would be to store an answer in a database and look it up?

    Thanks

    #130245
    CrocoDillon
    Participant

    I once needed sin and cos so much I decided to make an array with 360 values for each (rounded to degrees was enough accuracy), which was a nice speed improvement. Looking up indexed keys in databases will be equally fast, but it’s hard to say at what point one will become faster then the other. I’d suggest to run your own benchmarks and see from there if it’s worth it.

    #130266
    AlCapone
    Participant

    thanks, i like the array idea.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.