On Jul 31, 2014, at 7:13 AM, Geert Janssens <i...@kobaltwit.be> wrote:

> On Saturday 19 July 2014 11:53:37 John Ralls wrote:
> > The libmpdecimal branch now passes make check all the way through.
> > I've force-pushed a rebase on the latest master to
> > https://github.com/jralls/gnucash.git for anyone who'd like to play
> > with it.
> > 
> > Next step is to do some tuning to see how much I can shrink it while
> > getting full 64-bit coefficients (current tests limit it to 44-bits)
> > then profiling to see if there are any performance differences to
> > master.
> > 
> > Regards,
> > John Ralls
> > 
> > 
> > _______________________________________________
> > gnucash-devel mailing list
> > gnucash-devel@gnucash.org
> > https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>  
> Nice! Keep up the good work.
>  
> I'm curious to hear about the performance difference. Hopefully the 
> performance will be better :)

Libmpdecimal is about 25% slower as it is now, but I see some good optimization 
opportunities from the profile. I'm also looking at the Intel and GCC/ICU 
versions to see if they might prove faster, since mpdecimal is written 
specifically for Python and so has some extra overhead that doesn't seem to be 
present in the others.

The Intel version is particularly interesting because it uses a different 
encoding scheme and dispenses with contexts, both of which they claim afford 
much faster execution. Unfortunately their code is rather impenetrable and the 
documentation is sparse and difficult to understand. It also doesn't appear to 
expose an interface that can be used to extract a rational expression of the 
number, so it would require more code changes in the rest of GnuCash to be 
useable.

Removing the 44-bit clamp and increasing the range of the denominators from 
10^6 to 10^9 passes all tests except test-lots, which fails from being unable 
to balance the lots in complex cases. I'm still debugging that.

Regards,
John Ralls

_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to