stash/pkg/utils
SmallCoccinelle 38384f2c60
Improve oshash code (#1829)
Reduce allocations. Don't create intermediary arrays which we then
consume right after. Manually fuse the arrays and decode straight into
the sum instead.

Furthermore, don't invoke a Reader, but carve out the locations via a
loop, directly.

These two changes taken together speeds up oshash computations by a
factor of 10 according to the benchmark tests. The main reason for
this change is a much lowered memory allocation rate which in turn
improves GC pressure.

While here, add a benchmark for oshash computations and use it for
testing the performance.
2021-10-12 11:59:51 +11:00
..
boolean.go Lint checks phase 2 (#1747) 2021-09-23 17:15:50 +10:00
byterange.go Remove unused (#1709) 2021-09-09 14:10:08 +10:00
context.go Plugin hooks (#1452) 2021-06-11 17:24:58 +10:00
crypto.go Errcheck phase 1 (#1715) 2021-09-21 09:34:25 +10:00
date.go Fix json time when unmarshalling 2019-03-09 10:14:55 -08:00
file.go refactor: move from io/ioutil to io and os package (#1772) 2021-09-27 10:55:23 +10:00
file_test.go refactor: move from io/ioutil to io and os package (#1772) 2021-09-27 10:55:23 +10:00
float.go Configuration 2019-04-11 10:55:58 -07:00
image.go refactor: move from io/ioutil to io and os package (#1772) 2021-09-27 10:55:23 +10:00
int_collections.go Data layer restructuring (#997) 2021-01-18 12:23:20 +11:00
oshash.go Improve oshash code (#1829) 2021-10-12 11:59:51 +11:00
oshash_internal_test.go Improve oshash code (#1829) 2021-10-12 11:59:51 +11:00
phash.go Add various filter criteria (#1505) 2021-06-23 09:10:20 +10:00
resources.go Change thumbnail default size and resize algorithm (#336) 2020-01-31 17:19:15 -05:00
string_collections.go Discard null values from scraper results (#1374) 2021-05-16 16:40:54 +10:00
strings.go Handle case sensitive file moves (#1427) 2021-06-11 15:25:09 +10:00
symwalk.go Fix scan issue when encountering invalid symlinks (#871) 2020-10-20 17:00:23 +11:00
time.go Fix various generate issues (#1322) 2021-04-22 13:51:51 +10:00
user_agent.go Add User Agent to image download reqs (#1222) 2021-03-24 08:12:11 +11:00
vtt.go utils: vtt: test + rewrite (#1284) 2021-05-25 11:25:26 +10:00
vtt_test.go utils: vtt: test + rewrite (#1284) 2021-05-25 11:25:26 +10:00
windows.go Reorg 2019-02-14 15:42:52 -08:00