-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also, do not return an error when input format isn't supported. Just return `nil` exif. Using the stream API and avoid creating the Ifd mapping and tag index every time makes it faster: ``` name old time/op new time/op delta DecodeExif-16 3.42ms ± 0% 0.65ms ± 0% -81.12% (p=0.029 n=4+4) name old alloc/op new alloc/op delta DecodeExif-16 1.51MB ± 0% 0.59MB ± 0% -60.77% (p=0.029 n=4+4) name old allocs/op new allocs/op delta DecodeExif-16 12.9k ± 0% 1.9k ± 0% -85.48% (p=0.029 n=4+4) ``` It's still slower than what we had, though, but correctness comes at a cost: ``` name old time/op new time/op delta DecodeExif-16 186µs ± 0% 648µs ± 1% +249.21% (p=0.029 n=4+4) name old alloc/op new alloc/op delta DecodeExif-16 184kB ± 0% 593kB ± 0% +222.38% (p=0.029 n=4+4) name old allocs/op new allocs/op delta DecodeExif-16 1.20k ± 0% 1.88k ± 0% +55.99% (p=0.029 n=4+4) ``` See #8586
- Loading branch information
Showing
3 changed files
with
56 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,3 +72,6 @@ require ( | |
) | ||
|
||
go 1.16 | ||
|
||
|
||
replace github.com/dsoprea/go-exif/v3 => /Users/bep/dev/go/dump/go-exif/v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters