close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 11 years ago

Closed 11 years ago

#1744 closed defect (fixed)

LastNotEqual es ineficiente

Reported by: lmperez@… Owned by: Víctor de Buen Remiro
Priority: normal Milestone: Mantainance
Component: Kernel Version: 3.1
Severity: normal Keywords:
Cc: cocacola@…

Description

Hola Tol, comparando las funciones FirstNotEqual y LastNotEqual podemos ver que son tremendamente diferentes en coste de tiempos. Os pongo un ejemplo:

Serie ser = SubSer(Pulse(Today,Diario),y2000,y2015);

Real t1 = Time;
Date first = FirstNotEqual(ser, First(ser), 0);
Real CtrTime(t1);

Real t2 = Time;
Date last  = LastNotEqual(ser, Last(ser), 0);
Real CtrTime(t2);

Change History (2)

comment:1 Changed 11 years ago by Víctor de Buen Remiro

Status: newaccepted

El motivo es muy simple: FirstNotEqual está programada en C++ y LastNotEqual en TOL. En la próxima versión de TOL ya vendrá en el kernel.

comment:2 Changed 11 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: acceptedclosed

(In [6133]) Fix #1744

Note: See TracTickets for help on using tickets.