Re: Eu4 Upgrade - An update.
- Posted by mattlewis (admin) Feb 19, 2013
- 1567 views
As far as speed goes, and this is just testing my drawing routines, eu3 took about 55ms and eu4 takes about 56-57ms. A little bit slower but once its ran through euc I am getting faster compiled code then under eu3s translater. Has someone been optimizing euc? I am getting 3-5ms faster on all operations using the same stale old watcom compiler. Also, big props for the interface changes.
The translator is definitely producing faster code. There are some other new features that can speed up code, especially if you find that your code does a lot of slicing operations to remove or replace sequence elements.
Minor note, the initial launch of a eu app is substantially slower under eu4. Maybe this is a known issue, just thought I would kick it out there. The same app loads almost instantaneously under eu3.1 but it takes nearly 4 seconds under eu4. Probably just the result of progress but it does slightly feel like I just launched a java app... just teasing, kinda. :)
If you have a large application that uses a lot of global variables, this can definitely be the case. Euphoria has to do a bit more work to make sure it uses the right variables in various places. And easy thing to do is to make sure that you have include statements in your files for every file that you use (or, in the case of a library, the main include). This way, euphoria can more easily determine that it's using the right symbols. You'll need to do this once you've updated the code to use public or export scoped symbols instead of globals.
EDIT: Does anyone have a well written app that demonstrates proper include behaviour? When learning something new I like to emulate the pros.
You can take a look at the standard library in include/std. Those files use code from each other a lot.
Matt