lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Jun 22, 1998 at 10:51:51PM -0300, Norman Ramsey wrote:
> Speaking of this problem, are there any profiling tools that help
> identify hot spots in Lua code?

This would be pretty valuable, particularly for how I deal with
partitioning my functionality. Normally I'll write whatever I need in Lua
if I can do it without exporting some new function. The plan is to go back
and optimize things which end up too slow, however, so far speed has not
been a problem.

It would be really easy to strap on something which would gather
statistics about how many times a particular address/function was run.
This wouldn't give you timing information, but it would be half way there.
In fact, it could be done with the debugging interface.

Likewise, it should be easy to make a function profiler which uses the
debugging interface to time the amount of time spent in a function. (can
you trap on a return?)

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + jeske@chat.net