1. Including Graphics

Hi All,

Just realized something.
Due to Euphoria's ability to handle runtime calculated
constants, if you have directly included data in ascii
and/or compressed format you can declare the *TARGET* data
as a constant and bypass the extra memory overhead.

i.e. (using incbm.e)

constant bitmap=ebm("^%V#*G#UG#*&G#*(&G#G......")

Euphoria will recompress the data on execution then
declare the RESULT as a constant. The source data will
not be kept in memory (I assume).

I'll update incbm.e to make use of this method as soon
as I get time.

One of those obvious ones that laughs at you when you
eventually find it under the cushions on the sofa.

Graeme.

new topic     » topic index » view message » categorize

2. Re: Including Graphics

Graeme writes:
> Just realized something.
> Due to Euphoria's ability to handle runtime calculated
> constants, if you have directly included data in ascii
> and/or compressed format you can declare the *TARGET* data
> as a constant and bypass the extra memory overhead.
> i.e. (using incbm.e)
> constant bitmap=ebm("^%V#*G#UG#*&G#*(&G#G......")
> Euphoria will recompress the data on execution then
> declare the RESULT as a constant. The source data will
> not be kept in memory (I assume).

Your assumption is correct.
After the constant assignment to bitmap, Euphoria will
keep only the result of ebm(), and will free any other data
that is no longer needed, including the string "^%V..."
and any private variables within ebm().

Regards,
     Rob Craig
     Rapid Deployment Software

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

Search



Quick Links

User menu

Not signed in.

Misc Menu