Hi,
After last changes comparison table is (no -ko flags used):
No Test code Harbour PHP Python Ruby Java Java+JIT
----------------------------------+------+------+------+------+-------+
10'000'000 times:
11 nJ+=nI*2+17 4.61 3.41 6.54 25.53 1.36 0.08
12 nJ+=17+1+...+1+nI*2 4.61 6.10 6.62 45.86 1.36 0.08
13 nJ+=nI*2+17+1+...+1 10.86 5.95 12.96 45.78 1.92 0.17
200'000 times:
21 cI:=cI+"a" 0.08 6.70 0.11 25.80 1641.766 1650.437
22 cI+="a" 0.08 0.07 0.12 25.83 1649.344 1654.735
31 AADD(aI,{nI}) 0.16 0.29 0.32 0.20 0.76 0.40
32 AADD(aI,{aI[nI-1][1]+1}) 0.25 0.34 0.38 0.39 0.92 0.40
-----------------------------------------------------------------------
So, we need to work on typed integer variable optimisation to be perfect :)
The -ko compiler switch will decrease the cost of 13 test above to 12
level. Why you didn't use it?
actually, the reason is very simple. I was too lazy to compile test
code, so, I've just run it using hbrun.exe. I was unable to add -ko
switch, but I believe I'll get the same 4.61 for test13.
I'm really under express of your job.
It was not so difficult, but more routine job. In a last few days/nights
I moved dbtopas.lt domain to new openSUSE11.1 server. It was much more
difficult. I still have some questions, but perhaps on private mail,
since it is out of topic.
1) non-terminal symbol should be lowercase
2) terminal symbol can not be character. All ',', '(', ')' should be
changed to some define, like C_COMMA, C_LBRACKET, C_RBRACKET, etc. And
complex code has to be fixed to return these constants.
...
7) Bison allows access symbols not from current rule. Actually ParamOne
could be reached by $-1 from "middle C code", but these hacky solutions are
not allowed in lemon.
I'll try to put my hands on this, but these days I have more ideas than
time to implement it.
Best regards,
Mindaugas
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour