1. How to force Euphoria to create 64-bit atom?

As far as I know, construction "atom X = 1" create Euphoria's integer. My program have many lines such as

atom X = 1 - Y -- where Y is always float number

So, Euphoria will be converted 1 (integer) to 1.0 (atom) each time, yes? How to optimize it? May be, "atom X = 1.0"?

new topic     » topic index » view message » categorize

2. Re: How to force Euphoria to create 64-bit atom?

SnakeCharmer said...

As far as I know, construction "atom X = 1" create Euphoria's integer. My program have many lines such as

atom X = 1 - Y -- where Y is always float number

So, Euphoria will be converted 1 (integer) to 1.0 (atom) each time, yes? How to optimize it? May be, "atom X = 1.0"?

Why do you need this optimized? You would have to have millions of lines like this for you to even notice the difference in execution speed.

If you really must 'optimize' it, try this ...

atom X = 1.0000000000001 - Y 

but the difference is so tiny you'll not even notice it.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu