Hi,

Thanks CrocoDuck for discovering the problem and for providing the
examples. This was very useful!

As suggested by Oleg (thanks!), the problem was with the hash function. It
that was still a 32 bits version so to speak.

The problem has been fixed in version 2.5.27. The compiler now compiles
both examples in less than 3s on my machine (instead of 123s for the code
using doubles). Compiling all the examples of the example folder shows a
global improvement of around 10%.

Cheers

Yann


-------------------------

Yann Orlarey
Directeur scientifique
www.grame.fr



2018-03-23 6:52 GMT-07:00 Oleg Nesterov <o...@redhat.com>:

> On 03/22, CrocoDuck o'Ducks wrote:
> >
> > Sorry, I have been sidetracked a bit. See below 2 minimal examples.
> > firLongTime.dsp takes around 5 minutes to compile, while firShortTime.dsp
> > takes only a bunch of seconds.
>
> I see the difference too. With the "patch" below both versions
> take the same time to compile.
>
> > The FIR taps are all the same, only the
> > precision is different. 64 bit on LongTime, 32 on ShortTime.
>
> and thus the numbers returned by Node.getInt() which looks into the
> int/double union differ too.
>
> And this means that the hash-search time can differ very much. Depending
> on luck, I guess.
>
> Oleg.
>
> --- a/compiler/tlib/tree.cpp
> +++ b/compiler/tlib/tree.cpp
> @@ -134,7 +134,7 @@ bool CTree::equiv(const Node& n, const tvec& br) const
>
>  unsigned int CTree::calcTreeHash(const Node& n, const tvec& br)
>  {
> -       unsigned int                    hk = n.type() ^ n.getInt();
> +       unsigned int                    hk = n.type() ^
> 12345678;//n.getInt();
>         tvec::const_iterator  b = br.begin();
>         tvec::const_iterator  z = br.end();
>
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to