lua-users home
lua-l archive

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


On Mon, Apr 28, 2008 at 11:41:50PM -0400, Jerome Vuarand wrote:
> If you're going to keep your long strings intact, you can just put
> them in a userdata and pass them around to your own libraries. If
> you're going to manipulate them a lot with the Lua string library, an
> initial duplication won't be that much costly compared to the
> manipulations themselves.

Hrm.  Well, as John Carmack writes: "If you aren't sure which way to do
something, do it both ways and see which works better."  So I shall.

> If you're going to have mutable strings [...]

Nope, no need for mutable strings here.

> the cost of hashing a 100kB string is the same as for a 100B string

That's helpful to know, thank you.
-- 
Chip Salzenberg <chip@pobox.com>