[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua and pointers
- From: Ralph Hempel <rhempel@...>
- Date: Mon, 20 Nov 2006 12:14:29 -0500
David Given wrote:
Theodor-Iulian Ciobanu wrote:
From what I understand, this was in previous versions and has been removed.
I had no idea of that. I'll stick with gsub then, as using metatables would
slow me down a bit (more code around the gsub call).
Remember the two rules of optimising your code:
1. Do not optimise your code.
2. (for experts only) Do not optimise your code yet.
I don't remember if it was Fred Brooks or PJ Plaugher or Robert Pike
Make it work - then make it fast
Another thing that I know Plaugher wrote in his seminal work Programming
Pearl, is that before you optimize, instrument your code so that you
can measure improvements and at the same time determine exactly where
the bottleneck is.
Sometimes the slow part of your code is in unexpected places.