Slashdot Mirror


User: OtterMan

OtterMan's activity in the archive.

Stories
0
Comments
1
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1

  1. Code with performance in mind on What Are Good Web Coding Practices? · · Score: 1

    Many of the good books have already been mentioned in other posts...

    One thing to keep in mind: optimize as you go (use common sense). Here are a few examples:

    • use arrays over vectors when possible. It's a hell of a lot faster (30x - 40x on some examples).
    • sort the array if you're going to reference it a lot (people still believe in searching an array from start to end for some ungodly reason)
    • use regex to validate data (why are you parsing the input data manually? -- unless you can prove that it's faster)

    A lot of little performance hit eventually adds up to a bigger performance problem. Granted, there will be large performance problem, but sloppy programming should not add to the real problems.