Tim Chase <python.l...@tim.thechases.com> writes:
> As mentioned elsewhere, I've got a LOT of code that expects that
> string indexing is O(1) and rarely are those strings/offsets reused
> I'm streaming through customer/provider data files, so caching
> wouldn't do much good other than waste space and the time to maintain
> them.

I'm having trouble understanding -- if they're only used once then
what's the problem?  You're reading some enormous file into a string and
then randomly accessing it by character offset?  What size are these
strings?  I can think of a number of workarounds including language
extensions, but mostly I'd be interested in seeing some actual
benchmarks of your unmodified program under both representations.

Reply via email to