aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make benchmark against libtommath more fair: enable error checkingMattias Andrée2016-04-271-104/+343
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* zinit.3: document `struct zahl`Mattias Andrée2016-04-271-1/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Fix benchmark errorMattias Andrée2016-04-273-3/+3
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Fix possible memory in zstr on failureMattias Andrée2016-04-273-1/+6
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* zstr: add new parameter, n: the known limit out the length of the outputMattias Andrée2016-04-2711-146/+181
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* zstr_length.3: add missing blank spaceMattias Andrée2016-04-261-1/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add, and use, libzahl_memfailure for conciseness, also fix possible unset errnoMattias Andrée2016-04-264-15/+15
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* zzero1 did not guarantee that all arguments were evaulated exactly once, thus made static inlineMattias Andrée2016-04-261-1/+6
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Ensure that failure does not result in memory leakMattias Andrée2016-04-267-24/+102
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Zahl[en] is spelled with upper case ZMattias Andrée2016-04-242-3/+3
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add more functions to benchmark-funcMattias Andrée2016-04-241-3/+3
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* bench/benchmark-func.c: add support for more functionsMattias Andrée2016-04-241-44/+44
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* bench/benchmark-func.cMattias Andrée2016-04-2410-2/+405
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add support for benchmark against hebimathMattias Andrée2016-04-233-36/+405
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add support for benchmark against TomsFastMathMattias Andrée2016-04-223-3/+305
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Unlist fixed entry from the todo-listMattias Andrée2016-04-201-1/+0
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Fix warnings (that were not turned on by default)Mattias Andrée2016-04-0811-36/+32
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Some improvements:Mattias Andrée2016-04-085-21/+82
| | | | | | | | | | | - Improve .gitignore - Improve portability of the makefile - Bring the translations, for gmp and tommath, used by the benchmark up to date Signed-off-by: Mattias Andrée <maandree@kth.se>
* gitignore: blacklist _/, for private filesMattias Andrée2016-04-081-0/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Split out zahl-inlines.h zahl-internals.h from zahl.h to hide uninteresting stuffMattias Andrée2016-04-075-274/+287
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* zptest: use DEFAULT_RANDOMMattias Andrée2016-04-071-1/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add rand(3), lrand(3), and random(3) to zrandMattias Andrée2016-03-278-32/+211
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* zrand: add DEFAULT_RANDOM and FASTEST_RANDOMMattias Andrée2016-03-254-8/+35
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* zrand: add MODUNIFORM and add tests for QUASIUNIFORM and MODUNIFORMMattias Andrée2016-03-254-1/+57
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Rename zsplit_unsigned_fast_small_tainted to zsplit_unsigned_fast_small_autoMattias Andrée2016-03-252-2/+2
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add note on performance of commutative functions with assignment to operandMattias Andrée2016-03-161-0/+15
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Optimise zsqr, zmul, zstr, zdivmod, zpow, and zpowuMattias Andrée2016-03-168-91/+172
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Fix bug in libzahl_msb_nz_* and optimise and simplify libzahl_reallocMattias Andrée2016-03-152-17/+11
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Remove unnecessary trimMattias Andrée2016-03-151-1/+0
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Optimise zsqr, and optimise zmul a littleMattias Andrée2016-03-153-55/+112
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Optimise zsetup, zgcd, zmul, and zsqr and add -fltoMattias Andrée2016-03-1512-107/+171
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* OptimisationsMattias Andrée2016-03-1513-149/+214
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Optimise zswapMattias Andrée2016-03-141-1/+19
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Mostly optimisationsMattias Andrée2016-03-1424-251/+337
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Fix so that no workaround is required.Mattias Andrée2016-03-141-6/+1
| | | | | | Thanks to Alexis Megas. Signed-off-by: Mattias Andrée <maandree@kth.se>
* Cleaner workaround for clang bugMattias Andrée2016-03-141-32/+15
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add reference to clang bug reportMattias Andrée2016-03-141-0/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Multiple changes:Mattias Andrée2016-03-1341-152/+277
| | | | | | | | | | | | | | | | 1) Compile test with -O0, it takes too long otherwise. 2) Add error codes: ZERROR_0_POW_0, ZERROR_0_DIV_0, ZERROR_DIV_0, ZERROR_NEGATIVE. 3) Add workaround for a bug in clang (src/allocator.c). 4) Cleanups. 5) Minor optimisations. 6) Add inclusion guard for zahl.h. Signed-off-by: Mattias Andrée <maandree@kth.se>
* OptimisationsMattias Andrée2016-03-1338-151/+194
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Make zabs, zneg and zswap inlineMattias Andrée2016-03-135-46/+14
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add possibility to compare against libgmpMattias Andrée2016-03-133-0/+196
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add possibility to compare against libtommathMattias Andrée2016-03-123-1/+202
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* 64 bits (severely) outshines 16 bits and 8 bits in performance: do some cleanupMattias Andrée2016-03-122-20/+0
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* 64-bit chars out-perform 32-bit chars on almost all operations, and on all expensive operationsMattias Andrée2016-03-125-23/+17
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add simple benchmarkerMattias Andrée2016-03-093-0/+136
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* A brief description of exponentiation by squaringMattias Andrée2016-03-071-0/+6
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Fix another typoMattias Andrée2016-03-071-1/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Fix typoMattias Andrée2016-03-061-1/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* A description of the Karatsuba algorithmMattias Andrée2016-03-061-0/+6
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* -O3 seem to produce fastest binary1.0Mattias Andrée2016-03-061-1/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>