Commit Graph

16 Commits

Author SHA1 Message Date
Yann Collet
ae3dededed ensure bench speed measurement is more accurate for small inputs
Previous method would produce too many time() invocations,
becoming a significant fraction of workload measured.

The new strategy is to use time() only once per batch,
and dynamically resize batch size so that each round lasts approximately 1 second.

This only matters for small inputs.
Measurement for large files (such as silesia.tar) are much less impacted
(though decoding speed is so fast that even medium-size files will notice an improvement).
2018-02-20 13:09:13 -08:00
Yann Collet
7dba09af47 use more restrictive conditions for clock_gettime() 2018-01-16 10:21:37 -08:00
Nick Terrell
00eac87dda [lz4io] Refuse to set file stat for non-regular files 2018-01-05 11:54:35 -08:00
Nick Terrell
74d8688bc8 [bench] Use higher resolution timer on POSIX
The timer used was only accurate up to 0.01 seconds. This timer is accurate up to 1 ns.
It is a monotonic timer that measures the real time difference, not on CPU time.

Copied the benchmark code from 6ab4d5e904
2017-10-17 13:55:35 -07:00
Yann Collet
a33bf89c62 fix #332 : do not modify /dev/null permissions 2017-03-15 17:26:50 -07:00
Przemyslaw Skibinski
40ad1e85d4 upgraded util.h 2017-02-15 17:16:15 +01:00
Przemyslaw Skibinski
fea95c1567 use FindFirstFileA and FindNextFileA on Windows 2016-12-22 10:58:58 +01:00
Przemyslaw Skibinski
973bc79740 util.h and platform.h based on zstd 2016-12-21 16:10:09 +01:00
Przemyslaw Skibinski
9546ba62d0 executables use basic types from util.h 2016-12-21 09:44:59 +01:00
Przemyslaw Skibinski
2efedaf7dc fixed gcc warnings 2016-12-20 19:31:05 +01:00
Przemyslaw Skibinski
6adf05d1ed improved platform.h 2016-12-20 18:56:09 +01:00
Przemyslaw Skibinski
bb69cdf258 updated util.h 2016-12-20 18:03:30 +01:00
Nick Terrell
5b37837e6e Fix license and remove references to zstd 2016-11-10 17:27:56 -08:00
Przemyslaw Skibinski
8ddaddc2d6 updated #include in util.h 2016-11-04 15:52:34 +01:00
Przemyslaw Skibinski
8b8c726a5c bench.c based on zstd 2016-11-04 14:26:12 +01:00
Przemyslaw Skibinski
e7648f4fcc added -r option 2016-11-04 13:30:09 +01:00