Package index: Euribor and Euribor365 class with months and weeks slight optimisation for performance

Bug #1210013 reported by Henry Freedman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
JQuantLib
New
Low
Richard Gomes

Bug Description

All the Euribor and Euribor365 class with months and weeks should be refactored to use final objects as Periods and not create a new one for every client.

BEFORE:
public class Euribor10M extends Euribor {

    public Euribor10M() {
      this(new Handle<YieldTermStructure>());
    }

    public Euribor10M(final Handle<YieldTermStructure> h) {
        super(new Period(10, TimeUnit.Months), h);
    }

AFTER:
public class Euribor10M extends Euribor {
 public static final Period TENOR = new Period(10, TimeUnit.Months);

    public Euribor10M() { this(new Handle<YieldTermStructure>()); }
    public Euribor10M(final Handle<YieldTermStructure> yieldTermStructure) { super(TENOR, yieldTermStructure); }
}

Tags: performance
Revision history for this message
Henry Freedman (henry-6th) wrote :

Optimise also the sub package index.ibor

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.