[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: newindex performance
- From: Patrick Rapin <toupie300@...>
- Date: Sun, 19 Dec 2010 10:32:45 +0100
On my opinion, performance should only be taken in consideration for
small code snippets, which are executed in inner loops several
millions of times, like the pixel computation in digital image
processing.
Your need to notify the property value changes means you shall not be
interested in performance: such a mechanism is only useful when values
change infrequently.
For example, it would be nonsense to have a notification mechanism on
each increment of a CPU tick count... For frequently changing values,
it is better to perform a polling on that value.
To answer your original question, I think that the notification
function itself (like displaying on a console, writing to a file on
disk or sending over a socket) is certainly much slower than the
metatable indexing.