Unnecesary instantiations of Array objects

Bug #1209969 reported by Richard Gomes
6
This bug affects 1 person
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.

Tags: code-review
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.