Commit Graph

5 Commits

Author SHA1 Message Date
Timmy Welch
aa1fe89e96 Performance
Reduce allocations by re-using uint8 slices where possible
Use github.com/disintegration/imaging for resizing
Add a module option to skip RGB conversion for YCbCr images
2024-08-04 17:21:58 -07:00
evanoberholster
45da7a6fef
Refactored Perceptionhash for performance (#54)
* refactored Perceptionhash for performance

* update AUTHORS.md

* replaced PerceptionHash algorithm

* Update hashcompute_test.go

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>

* Update hashcompute_test.go

Co-authored-by: Evan Oberholster <eroberholster@gmail.com>
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2022-05-26 15:56:47 +09:00
Alex
c41a59a872 add PerceptionHashExtend function (#18)
goimagehash: Implement PerceptionHashExtend
2019-02-08 18:02:25 +09:00
Dominik Honnef
ad2b6ded3b Use bits.OnesCount64 when available
Benchmark on i7-2600k, which has the POPCNT instruction:

name                 old time/op  new time/op  delta
DistanceIdentical-8  5.08ns ± 0%  1.01ns ± 1%  -80.07%  (p=0.008 n=5+5)
DistanceDifferent-8  81.5ns ± 2%   1.0ns ± 0%  -98.76%  (p=0.016 n=5+4)

Benchmark on Cavium Octeon, a MIPS64 platform with no dedicated
instruction:

name                 old time/op  new time/op  delta
DistanceIdentical-2   120ns ± 6%   144ns ± 5%  +19.93%  (p=0.008 n=5+5)
DistanceDifferent-2   656ns ± 4%   144ns ± 4%  -78.09%  (p=0.008 n=5+5)
2018-05-02 23:52:38 +09:00
Dong-hee Na
dbc186a437 Update AUTHORS 2017-11-17 14:33:21 +09:00