magnetophon / DigiDrie

A monster monophonic synth, written in faust.
GNU Affero General Public License v3.0
21 stars 0 forks source link

Long Evaluation Time #8

Open ryukau opened 4 years ago

ryukau commented 4 years ago

Evaluation stage of Faust takes more than 120 seconds on my environment. This triggers Alarm clock and compilation is terminated when using faustbench. Probably there's workaround, however it's nice to reduce evaluation time if possible.

Full output of faust2jaqt. end evaluation indicates 141 seconds.

$ faust2jaqt -t 0 -time -midi -nvoices 1 DigiDrie.dsp

start parser

end parser (duration : 0.18698)

start evaluation

end evaluation (duration : 141.073)

start propagation

end propagation (duration : 6.30136)

start generateCode

    start prepare

        start deBruijn2Sym

        end deBruijn2Sym (duration : 0.136454)

        start L1 typeAnnotation

        end L1 typeAnnotation (duration : 0.172746)

        start Cast and Promotion

        end Cast and Promotion (duration : 0.0653901)

        start simplification

        end simplification (duration : 0.279493)

        start Constant propagation

        end Constant propagation (duration : 0.0178809)

        start L5 typeAnnotation

        end L5 typeAnnotation (duration : 0.101538)

    end prepare (duration : 5.85807)

    start compileMultiSignal

        start prepare2

        end prepare2 (duration : 0.00033021)

    end compileMultiSignal (duration : 0.611087)

end generateCode (duration : 8.27195)
./DigiDrie;
magnetophon commented 4 years ago

I know, and I'm working on it.

I just added build instructions with the workaround to the readme.

magnetophon commented 4 years ago

For tests, you can dramatically speed up the compile by changing:

nrEnvelopes = 2;
nrLFOs      = nrEnvelopes;
nrMacros    = nrEnvelopes * 1;

The evaluation time goes from +/- 300s to +/- 3s

ryukau commented 4 years ago

Thanks for the information. This helps a lot.

magnetophon commented 4 years ago

In one of the last commits, the evaluation time dropped from 80 seconds to 40.

No idea why.

Did that happen for you as well?

ryukau commented 4 years ago

Evaluation time of df17d33 (latest modification to Faust codes) and b77b5b3 (merge of 3D cross-fade) are same on my environment.

magnetophon commented 4 years ago

¯\_(ツ)_/¯