in reply to Efficient programming

Efficient programs come from efficient algorithms. You'd best search for material on algorithms.

Replies are listed 'Best First'.
Re^2: Efficient programming
by Erez (Priest) on Dec 22, 2008 at 07:51 UTC

    OTOH, "Data dominates. If you've chosen the right data structures and organized things well, the algorithms will almost always be selfevident. Data structures, not algorithms, are central to programming." (Rob Pike Notes on Programming in C)

    As for the OP, "efficient" is a buzzword. Make your programming simple, concise, clear, and correct. For some simple guidelines, try that URL I pasted above, it's the best article about programming practices I know.

    "A core tenant of the greater Perl philosophy is to trust that the developer knows enough to solve the problem" - Jay Shirley, A case for Catalyst.

      I agree. If it's a straightforward task as it usually is, efficiency shouldn't be a concern. Efficiency is therefore only relevant in the rare cases where there are very demanding needs. That's when you need to worry about your algorithms.

      Rob Pike knows his classics:

      Show me your flowchart and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won't usually need your flowchart; it'll be obvious. -- Fred Brooks, The Mythical Man-Month

      He wrote that in 1975. It's still just as true today.

      • another intruder with the mooring in the heart of the Perl