2009/9/22 David R White <[log in to unmask]>
Sounds like a potential application for Java generics?  Generics would also help reduce the number of times casting is required and improve the readability of code.
Ah, generics, is what I was refering to, but I used the word "template" instead. Sorry, c++ habit.
Considering that ECJ is used by a lot of people, the code needs to be understood by a great number of people. That would make improved code readability a very good thing IMO.

Downsides are the amount of work, and possible efficiency concerns.  I'm no expert on the latter.
I don't believe there are "efficiency concerns", but I'm absolutely no java expert. (And Sean commented on this while I was typing)


Sean Luke wrote:
On Sep 21, 2009, at 7:01 PM, Claes Gyllenswärd wrote:

If I recall correctly, floats were chosen because the speed penalty one gets when using doubles?

Memory mostly, but also the speed penalty involved in generating random double values using Mersenne Twister.  It's almost inconsequential nowadays.
I was under the impression that you were talking about converting _only_ the fitness values from float to double. Does that necessitate a rewrite of the MT?


>Unfortunately, Java's generics are *grotesquely* inefficient, making them entirely inappropriate for an EC system.  It's one reason why ECJ uses them nowhere.  :-(
They are? I was under the impression that generics was no more or and no less than syntactic suger. Providing more compiler errors, fewer runtime ones,
(I assume everyone considers that a great thing) but all in all the same bytecode?
This page:http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html states that
"The net effect of using generics, especially in large programs, is improved readability and robustness.".
while it doesn't say "while retaining your performance", my interpretation of it is that it will..