On Sat, Aug 30, 2014 at 7:10 AM, abhinav baid <
abhin...@gmail.com> wrote:
> Here are the timings for randajtai (with alpha = 0.5):
>
> | d | FLINT | fpLLL |
> | --- | -------- | -------- |
> | 32 | 0.007192 | 0.011587 |
> | 64 | 0.02991 | 0.05805 |
> | 96 | 0.103186 | 0.156087 |
> | 128 | 0.238155 | 0.284892 |
> | 160 | 0.550085 | 0.424788 |
> | 192 | 1.10902 | 0.785056 |
> | 224 | 1.39008 | 1.79943 |
> | 256 | 2.52803 | 3.01734 |
> | 288 | 4.66249 | 5.81334 |
Sorry I didn't address this at the time, but Ajtai-type bases were
really intended to be used with alpha > 1 so that LLL exhibits
worst-case runtime behaviour. With alpha <= 1 you will get bases
which are really close to being reduced (in fact, if you use the
definition in the LLL book they will already be reduced).
To satisfy my curiosity on this, I wrote some profiling code to
compare the flint and fplll wrapper functions
[
https://github.com/curtisbright/flint2/blob/p-fplll/fmpz_lll/profile/p-fplll.cpp].
(It assume this won't compile with the rest of flint's profiling code
without some extra configuration.) Here are the results with alpha =
1.5:
dim = 10 flint/fplll 26 18 (ms) ratio 1.44
dim = 20 flint/fplll 25 20 (ms) ratio 1.25
dim = 30 flint/fplll 216 188 (ms) ratio 1.15
dim = 40 flint/fplll 1233 995 (ms) ratio 1.24
dim = 50 flint/fplll 4986 3852 (ms) ratio 1.29
dim = 60 flint/fplll 17335 13014 (ms) ratio 1.33
dim = 70 flint/fplll 53970 39713 (ms) ratio 1.36
dim = 80 flint/fplll 140728 104242 (ms) ratio 1.35
dim = 90 flint/fplll 341570 253444 (ms) ratio 1.35
dim = 100 flint/fplll 729644 543317 (ms) ratio 1.34
dim = 110 flint/fplll 1504847 1087740 (ms) ratio 1.38
dim = 120 flint/fplll 3218280 2260931 (ms) ratio 1.42
dim = 130 flint/fplll 6381483 4500729 (ms) ratio 1.42
dim = 140 flint/fplll 11676957 8427307 (ms) ratio 1.39
I also timed fmpz_lll instead of the wrapper, and the result was
actually slower:
dim = 10 flint/fplll 11 22 (ms) ratio 0.50
dim = 20 flint/fplll 48 20 (ms) ratio 2.40
dim = 30 flint/fplll 360 190 (ms) ratio 1.89
dim = 40 flint/fplll 2144 990 (ms) ratio 2.17
dim = 50 flint/fplll 7681 3866 (ms) ratio 1.99
dim = 60 flint/fplll 26869 12763 (ms) ratio 2.11
dim = 70 flint/fplll 77946 39519 (ms) ratio 1.97
dim = 80 flint/fplll 201416 104367 (ms) ratio 1.93
dim = 90 flint/fplll 437253 251335 (ms) ratio 1.74
dim = 100 flint/fplll 856015 538338 (ms) ratio 1.59
dim = 110 flint/fplll 1630932 1084483 (ms) ratio 1.50
On Tue, Sep 23, 2014 at 10:12 AM, Bill Hart <
goodwi...@googlemail.com> wrote:
> If the version using doubles fails, a
> version using mpfr's is used. And if that fails, a fallback version which
> uses exact arithmetic is employed.
I would avoid using exact arithmetic. I haven't done actual timings,
but in the worst case one can just run L^2 to a probably correct
precision—asymptotically this should be no worse than even just
checking a basis for reducedness using exact arithmetic.
Curtis