Am 22. Dezember 2019 01:10:47 MEZ schrieb Claude Heiland-Allen <[email protected]>: >Hi, > >On 19/12/2019 20:01, IOhannes m zmölnig wrote: >> the high-performance phase-wrapping algorithm >For reference: >https://github.com/pure-data/pure-data/blob/e3a78da5b7d825bf8b9f5d313e4ea55e5e32e8f1/src/d_osc.c#L91-L97 > >(current master at time of writing) > >Using a [phasor~] with x -= floor(x); for wrapping is about twice as >slow as the built-in tabfudge version, provided I compile with >-march=native on my AMD Ryzen 7 2700X Eight-Core Processor. When >compiled with pd-lib-builder's default -march=core2, the floor version >is over five times slower. I can run tests on other hardware in early >January if more data points are desired. > >Benchmark methodology: time how long running 1000 copies of [phasor~ >440]
thanks for the benchmarks. as katja pointed out, due to branch-prediction the actual frequency of `[phasor~]` might have an impact as well. >I suppose it's not so hard to load a custom phasor~ library (source >attached), if you need the extra accuracy of the floor version, and can > >live with the slowdown. i think this is a good (intermediate?) solution. as long as the core framework works with double-precision and no internal object produces actual garbage when compiled with double-precision (as is the case right now), Pd-dbl might be ready to fly... mfg.hft.fsl IOhannes _______________________________________________ Pd-dev mailing list [email protected] https://lists.puredata.info/listinfo/pd-dev
