#14 Special case for polyfit, move initw()

Unstable (example)
closed-fixed
nobody
None
5
2013-12-30
2012-08-20
No

Adds special case for degree 1 polynomial in polyfit.c as it seems that it's really only called with degree=1. Speeds up plotting and fourier analysis, for example, running "examples/transient-noise/noise_vnoi.cir" in batch mode goes from 6.7s to 5.4s.
Does it need similar error checking as in the original code? Everything seems to be working correctly right now, but there might be some corner cases.

Currently 1/f noise generator is initialized at startup even if it's not used. Initialization can be done in 1-f-code.c. Saves small amount of memory and few instructions, nothing dramatic.

Patch attached.

Discussion

  • Henrik Forstén

    Henrik Forstén - 2012-08-20

    Patch

     
  • Holger Vogt

    Holger Vogt - 2013-12-30
    • status: open --> closed-fixed
    • Group: --> Unstable (example)
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks