Refactor IntervalPrice?

Bug #1209990 reported by Richard Gomes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
JQuantLib
New
Medium
Unassigned

Bug Description

This issue is in complement to issue 515
http://bugs.jquantlib.org/view.php?id=515

In some cases, we have TimeSeries<IntervalPrice>, which would mean:
  class TimeSeries<IntervalPrice> extends Series<Long,IntervalPrice>

Notice that IntervalPrice has the following internal fields:
    private double open;
    private double close;
    private double high;
    private double low;

In this way, it would be better, from performance of view, to have TimeSeries (or Series, to be more precise) simply as a Decorator which aggregates structures backed on primitive types (fastutil), delegating calls as necessary to underlying objects.

So, one idea would be maintaining internal Maps like this:
    Map<Long,Double> open;
    Map<Long,Double> close;
    Map<Long,Double> high;
    Map<Long,Double> low;

It's not clear at this point if it would be viable to refactor IntervalPrice.

=============
Relationships
=============
related to http://bugs.launchpad.net/bugs/jquantlib-515

Tags: performance
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.