Opened 14 years ago
Last modified 13 years ago
#1520 closed defect (fixed)
Bootstrapping needs tail recursion optimization
Reported by: | Martin Sjölund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | Martin Sjölund, |
Description
The optimized form (list-reduction) will never be beaten, but it would be nice if we could add our own tail recursion optimization here anyway.
loadString(" function f String c; list<String> chars; list<Integer> ints; output Real t; algorithm c := System.readFile(\"text\"); print(\"read\n\"); chars := stringListStringChar(c); print(\"converted\n\"); System.startTimer(); for i in 1:1000 loop //ints := list(stringCharInt(c) for c in chars); ints := Util.listMap(chars, stringCharInt); end for; System.stopTimer(); t := System.getTimerIntervalTime(); print(\"mapped\n\"); end f; "); loadFile("../dev/trunk/Compiler/Util/System.mo"); loadFile("../dev/trunk/Compiler/Util/Util.mo"); f();getErrorString();
Note:
See TracTickets
for help on using tickets.