Re: Fast appending and sorting of alot of short strings

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

Pete Lomax wrote:
> How about giving external programs an integer index, rather than
> letting/making them store the table as a sequence. Using a table of
> tables internally, you can do this:
True, but then every operation has to be done through routine-calls.
The collections I have now, are just sequences. I can subscript them,
and slice them using normal sequence-syntax.

<SNIP>

> PS I couldn't see the purpose of:
> 		if growSize > GROWSIZE then
> 			collection &= repeat(0, growSize + GROWSIZE)

OK, this piece of code probably doesn't fit in anymore, because
it used to be in a different function. If you just add 1 element
to a collection, this isn't necessary. I previously had a function
'ensureCapacity', which would grow the collection to ensure a given
capacity. It's useful if you know in advance that you'll add 100
elements, you first call 'ensureCapacity', and the collection grows
enough to allow you to add the 100 elements faster.

--
tommy online: http://users.telenet.be/tommycarlier
tommy.blog: http://tommycarlier.blogspot.com
Euphoria Message Board: http://uboard.proboards32.com
Empire for Euphoria: http://empire.iwireweb.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu