lua-users home
lua-l archive

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


On Tuesday 15 August 2006 10:45 am, D Burgess wrote:
> results of your benchmarks. The rule of /make it work first/ (using Lua
> strings) and if you need to optimize with C buffers do it when a benchmark
> justifies it.

i would add that in many cases, the IO bottlenecks are far more important than 
string handling overhead.  Xavante uses strings for all it's data handling, 
without any fancy optimisations, and it usually outperforms Apache on most 
loads (as do most 'little' web servers, of course).

and as for releasing them, you can trust the garbage collector. even 
CGILua .lp pages, which do a lot of string handling and compiling all the 
time, shrink back to around 40-60k of RAM on 'resting' periods after handling 
thousands of requests to tens of simultaneous clients.

of course, it would be neat to have a 'buffer' datatype, without hashing, just 
haven't found any real case that would justify it.

-- 
Javier

Attachment: pgpR8d3PFYQFy.pgp
Description: PGP signature