Optimizing HPP program
|
03-11-2019, 08:47 AM
(This post was last modified: 03-11-2019 09:43 AM by Oulan.)
Post: #3
|
|||
|
|||
RE: Optimizing HPP program
Yes, this program is a bit strange but is related to 'Major bug on G2'
So if I understand correctly, {'f0','f1',..} is not stored as list of 'direct_reference' to the functions? but as "string" and a search is done in the unordered list of local stuff {local variables + local functions} or is it the {}(index) which is done in linear time ? (I don't think so, in this case the search time should be constant). If so, this mean that you should not declare too much local stuff, perhaps it is better to use Lists to hide the search at a second level. And we should break the app with smaller units (more hpprgm outside the main hppgm of the app) ? But the problem of the exported variables will raise again (and also the problem of circular use of exported variables (egg&chicken pb)). Btw did you reproduce the bug in 'Major bug on G2' ? It can need several runs before hitting the 'reboot' Anyway I am very pleased with the prime, HPP langage is quite nice and rather fast (around the level of non optimized C code on a TI83PCE) which is really good. I will try other way to optimize (perhaps list constructions ...) EDIT: I made other tests on this kind of program. Conclusion is: any kind of call (fxx(), EVAL('fxx')) will take more time if you have more functions defined. Even if you call the first function or the last one ... this is strange I don't completly understand this behavior ... (perhaps linked to the hiden parser and structure). Olivier |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Optimizing HPP program - Oulan - 03-08-2019, 08:45 AM
RE: Optimizing HPP program - cyrille de brébisson - 03-11-2019, 06:53 AM
RE: Optimizing HPP program - Oulan - 03-11-2019 08:47 AM
|
User(s) browsing this thread: 1 Guest(s)