Re: time impact of the delta signature

Denis Corbin <[email protected]>
Newsgroups gmane.comp.sysutils.backup.dar.support
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 23/02/2019 12:40, Graham Cobb wrote:
> On 23/02/2019 09:24, Denis Corbin wrote:
>> Of course an approximate value of root mathematical functions is 
>> sufficient to answer the need. And as infinint type is just an
>> integer type that has no limit (except the available memory
>> resources) and that the shift left and right operations are
>> already implemented, thus little remains to do to add the
>> approximate square, cube, ... root functions! :)
> 
> By the way, it also occurred to me that infinint exp2 can easily
> be optimised by a compile-time lookup table for the first N values
> (maybe 32 or 64) -- backed up by a generalised implementation for
> larger values (maybe based on knowing the internal structure of
> infinint instead of needing an actual shift loop).

that's effectively an option. Though such option hits the problem of
how big should be the size of the lookup table. Anyway, I will first
have to measure the execution cost of this optimized/approximate math
operation and see if it worth optimizing any further by a lookup
table, noted.

> 
> In reality it may be easiest using the rs_long_sqrt algorithm
> pointed out by andycapo for filesizes which do fit in a simple type
> and keeping the log/exp algorithm for cases where the
> multiplications in the> rs_long_sqrt algorithm would require
> expensive infinint arithmetic.

as filesize are stored as infinint, it would require testing the value
of the file size below which it would be possible to convert it to a
'simple type' then apply the rs_long_sqrt to it... I'm affraid the
conversion will ruine the optimization ... will here too have to
measure the cost of conversion against the gain rs_long_sqrt brings.

Thanks for these ideas
Denis

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEOzEprx3d76WjfYGPCDGwvQPYsYIFAlx0QjsACgkQCDGwvQPY
sYJ+JA//R+yH3Xlqir9EcSOThoq+d0/gwW/lKGYqXMwgqIfnois7iqlWtwmbtcrn
yQ7pn7yjlc8A/RGxOzLyQcNTT9XKrRI3xPf15We/awaICiuDuETtA4bFm3lZ5LeK
pS0dKYrPmmzZejaS0f062EadCuwFE4/QfqsWwt96HrILwoZhlLJGHaZ9tghJQ7dY
JC0u8RaRIUhRI1RUY2CV1cuAPwkDzFEJFB1NI4W+mgPZbAYt4YNYxxeeTCQ59fEH
+GaWn2OPZJsxBPzZbITpRLh66UQT1lVfV4JP0VafP03IAhV8163tCCGLpjGLkOl4
htXGCmDnK160kQ50K4jx2GNjAP+KaCSM0VyvKtk+Dd6KLLmbfLlshaWKe9expm0I
ydz0bjdIJp6N+dnu+0W6nsB1LKZqgFbjxFcK3ThzwNmj5SEJacRT2APFQNFjR9Bv
0kMuHXoeEa2ajl+mC9wrzDchnPmMTC6Id7lReYTJZkBdGJmRpUQo7sQjPeDtyusm
Nl5WJbVuKwD326ygSHiN8Ija49YDseIzRNLN6Qc3x43TmyBQS40Ju3+Y6mJncyb6
Ybi8oZgEhPDzqekB9nRLjdBCPoqhYPzrwOwqVVRYiNb5JnKBLrVZ+XbZ76Ikxzw5
dj6B8Bra9T2WdK5cNT3yNMENoNQx4sjDL8SvmfzYJgAnC+f1p1M=
=n69Z
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.