[yoshimi] Re: Significant changes to the Engine? -- Re: Yoshimi V 1.5.10
- From: Will Godfrey <willgodfrey@xxxxxxxxxxxxxxx>
- To: yoshimi@xxxxxxxxxxxxx
- Date: Thu, 20 Dec 2018 09:08:56 +0000
On Thu, 20 Dec 2018 02:30:34 +0100
Ichthyostega <prg@xxxxxxxxxxxxxxx> wrote:
Am 19.12.18 um 17:17 schrieb Chris Ahlstrom:
Sounds like an option to use new vs old RNG might be in order....?
of course yes, but...
The calls to the random number generator are in the innermost loop
and they call a local function, which means it can be aggressively optimised
by the compiler. If we just naively make that "switchable", we'd get an
indirect call trough a function pointer somewhere. And under the given
conditions, I'd expect this would create quite an significant overhead.
Haven't benchmarked it, but all experience tells me so.
So we'd have to pull off some more clever tricks, like using C++ Templates.
Or code generation of some kind. All of which, while certainly doable,
is rather outside the style and scope of the existing code base.
This also doesn't actually solve the problem, which could bite us later on.
There *shouldn't* be such a significant difference, suggesting there is a fault
of some kind.
Is there something wrong with the old code? This is possible. There was an
error I identified and corrected, but that was only relevant to the case where
it had failed to get a value - which shouldn't happen under normal
circumstances. Alternatively, is there something wrong with the way I've
implemented the new code, or have I inadvertently altered something that maybe
has nothing to do with randomness itself?
Will J Godfrey
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
Yoshimi source code is available from either:
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx
Other related posts: