![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Fri, Dec 20 2013 10:37 AM | Permanent Link |
Matthew Jones | How good is the optimiser in the EWB compiler? If I write code like:
fBucketTick := (ScalePanel.Width - SCALE_BAR_OFFSET - SCALE_BAR_OFFSET); Is it able to take those two Const values and make them a single value at compile time? I'm not expecting an amazing optimiser, but am hoping that it can do these simple ones. It's a long time since I wrote a compiler, so I haven't been able to say "directed acyclic graph" at parties for a while. 8-) /Matthew Jones/ |
Sat, Dec 21 2013 6:37 PM | Permanent Link |
Raul Globestar Systems ![]() | On 12/20/2013 10:37 AM, (Matthew Jones) wrote:
> How good is the optimiser in the EWB compiler? If I write code like: > > fBucketTick := (ScalePanel.Width - SCALE_BAR_OFFSET - SCALE_BAR_OFFSET); > > Is it able to take those two Const values and make them a single value at compile > time? I'm not expecting an amazing optimiser, but am hoping that it can do these Not at this time as per quick test. Since we're generating JS you can see the end result by opening the resulting file. Most of the optimization AFAIK currently done is to eliminate code that is never called thus reducing the JS size. Considering the EWB app is run by the JS engine in the browser there might be additional optimizations done at that execution time. At the rate JS engines are improving my vote goes for more features and then optimize later when need arises. Raul |
Sun, Dec 22 2013 7:48 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Matthew,
<< How good is the optimiser in the EWB compiler? If I write code like: fBucketTick := (ScalePanel.Width - SCALE_BAR_OFFSET - SCALE_BAR_OFFSET); Is it able to take those two Const values and make them a single value at compile time? >> 1.03 does constant folding for strings (don't ask), but I can probably squeeze in integers and Booleans. In general, I don't try to modify the original code too much so that it's somewhat recognizable in the various browser debuggers. Otherwise, it makes debugging difficult. I should probably combine the compression option with these other types of optimizations, because when the code is compressed, it can't be debugged anyways. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, March 29, 2023 at 10:59 PM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |