[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Significant optimization of ft_div64by32
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] Significant optimization of ft_div64by32 |
Date: |
Fri, 03 Oct 2014 06:56:06 +0200 (CEST) |
> I have just committed significant optimization of ft_div64by32, one
> of the more expensive calculations that we sometimes do on 32-bit
> platforms. The trick was to do as much as we can with 32-bit
> division before embarking on bit-by-bit long division. So we shift
> as many bits as we can into the high register, perform 32-bit
> division with modulo there, then work through the remaining bits
> with long division. This optimization is especially noticeable for
> smaller dividends that barely use the high register.
Thanks. Do you have some numbers for you claim? Additionally, I
wonder whether your optimization also holds for older architectures
where division and multiplication are much more expensive than
operations like shifting and ORing.
Werner