Re: subsequence storage

new topic     » goto parent     » topic index » view thread      » older message » newer message

Preallocation via repeat is a good solution, thanks.

>It has mainly been pointed out by people who
>"heard" of the problem and then constructed
>an artificial program to demonstrate it.

Actually, I have run across this problem in a "real" program, though I
didn't know it at the time.  The program dealt with several little
creatures scurrying around in a virtual environment, 500*500*3 4 byte
spaces stored in memory.  Each creature's behavior was controled by a
function into which I fed a sequence repesenting the 101*101*3 area around
it (50 spaces in each direction).  Each 4 byte space was translated into
6-8 integers which were appended onto the subseqence representing that
space.  I had abandoned the project because it was just too slow, but after
a few changes to the code to avoid appending, it's beginning to look viable.

thanks,
Isaac

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu