Hello, I noticed the huge commit 2f8a2487597092e2a7df04f176f7b03e5788dd59 ("Merge master-with-mute branch, set version to 0.12.0.") which does not have any documentation, so I tried to look at this patch to understand what it does and now I have a couple of questions. Plus I have some concerns about the changes in compile_scal.cpp.
------------------------------------------------------------------------------ Firtsly, the change in generatePrefix() is obviously wrong. I understand that nobody cares, this primitive was always broken, but now even this faust code process = prefix(1,2); can't be compiled. --- a/compiler/generator/compile_scal.cpp +++ b/compiler/generator/compile_scal.cpp @@ -1094,7 +1094,7 @@ string ScalarCompiler::generatePrefix (Tree sig, Tree x, Tree e) fClass->addDeclCode(subst("$0 \t$1;", type, vperm)); fClass->addInitCode(subst("$0 = $1;", vperm, CS(x))); - fClass->addInitCode(subst("$0 \t$1;", type, vtemp)); + fClass->addDeclCode(subst("$0 \t$1;", type, vtemp)); fClass->addExecCode(Statement(getConditionCode(sig), subst("$0 = $1;", vtemp, vperm))); fixes this particular problem. But as I said it is still broken. ------------------------------------------------------------------------------- Now lets look at the change in ScalarCompiler::generateVariableStore(). I guess it connects to the "strange" semantics of control primitive (see below) but this looks obviously unfriendly performance-wise. Even this trivial example import("stdfaust.lib"); process = ma.nextafter <: +(1),-(1); shows the difference. "faust -a bench.cpp" reports before "Merge master-with-mute branch": 53.143 425.144 MB/s inputs 425.144 MB/s outputs 51.8919 38.596 53.3681 426.945 MB/s inputs 426.945 MB/s outputs 52.0998 41.9565 53.0742 424.593 MB/s inputs 424.593 MB/s outputs 51.8304 42.4126 after: 52.3618 418.894 MB/s inputs 418.894 MB/s outputs 51.1408 32.3092 52.2949 418.359 MB/s inputs 418.359 MB/s outputs 51.3026 39.413 52.4288 419.43 MB/s inputs 419.43 MB/s outputs 51.5565 46.3348 ------------------------------------------------------------------------------- Finally, could you please explain control/enable primitives added by that commit? OK, I understand what they do. Say, control(x,y) is roughly control(x,y) = select2(y, _, x) ~ _; _except_ "x" is not computed when y == F and nothing else needs the value of "x". OK, looks useful, but: - why it depends on the new "-es" option added by the same patch? "-es 0" turns control() into identity function, and this changes its semantics completely. Not to mention this contradicts with "faust --help" which says "use --enable-semantics 1|0 when 1 and simple multiplication otherwise" - why it can not be implemented without penalizing generateVariableStore ? Thanks, Oleg. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Faudiostream-devel mailing list Faudiostream-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-devel