1. Euphoria optimization

I haven't seen the source code of Euphoria, but I may have found a way 
to optimize it a little (if the optimization doesn't yet exist).

I (and I think a lot of programmers) use empty sequences quite 
frequently. Isn't there a way of optimizing those cases. I guess (I 
don't really know) that in the current version of Euphoria, each literal 
{} and "" creates a new sequence in memory. Couldn't you create an empty 
sequence at the beginning, and each time you find a "" or a {} (which 
might have whitespace in between), you just refer to that empty 
sequence? I don't know if this would have a big impact on speed, or 
memory usage, or if it already exists, but every optimization might 
help.
______________
tommy online: http://users.pandora.be/tommycarlier

new topic     » topic index » view message » categorize

2. Re: Euphoria optimization

Tommy Carlier wrote:
> I haven't seen the source code of Euphoria, but I may have found a way 
> to optimize it a little (if the optimization doesn't yet exist).
> 
> I (and I think a lot of programmers) use empty sequences quite 
> frequently. Isn't there a way of optimizing those cases. I guess (I 
> don't really know) that in the current version of Euphoria, each literal 
> {} and "" creates a new sequence in memory. Couldn't you create an empty 
> sequence at the beginning, and each time you find a "" or a {} (which 
> might have whitespace in between), you just refer to that empty 
> sequence? I don't know if this would have a big impact on speed, or 
> memory usage, or if it already exists, but every optimization might 
> help.

Yes. That optimization has been implemented already.

Regards,
    Rob Craig
    Rapid Deployment Software
    http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu