Leopold Toetsch <[EMAIL PROTECTED]> wrote: [ blabla ]
Sorry. This scheme with constant strings in constant memory doesn't work - at least not with ARENA_DOD_FLAGS enabled, which assumes *all* objects are coming from arenas. These string headers live outside of any arena. It could work w/o ARENA_DOD_FLAGS *if* these strings get additional flags set: - is_live ... would prohibit setting live bits - dont_touch_or_free_header ... might be needed for destruction But with ARENA_DOD_FLAGS enabled, I don't see much chance to get this running. This would need collecting all constant strings in an aligned memory segment, attach an arena header to it and set live bits in attached dod_flags - a lot of work for a preprocessor, albeit doable with a lot of effort. So what about a string cache. Could work similar to the method cache with lookup via some address bits. Should still be cheaper then constructing all these strings ever and ever. Brainstorming time... leo PS why I really like to have something like this: $ time parrot -jG ff.pasm 010 real 0m1.728s # with _S("__get_integer") real 0m2.148s # with const_string(...)