Unnecesary instantiations of Array objects
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
JQuantLib |
New
|
Medium
|
Unassigned |
Bug Description
There are situations in the code that *seems like* instances of Array are being create without any need for them. There are 2 situations:
1. A variable is initialized with "new Array", i.e.: array of size zero.
Later on another Array is created and assigned to the same variable.
In this case, *seems like* the first initialization is absolutely irrelevant.
2. There are method which require an Array as parameter.
Analysing the code, we discover that such parameter is not used at all, which means that we are penalizing CPU cycles and GC without any benefit or need at all.
At this point it is not clear why our code present such issues.
In any case, we should work in order to reduce performance cost of these cases.