mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-25 21:21:22 +03:00
identity: Use clear to clear the finder seen map
Faster: ``` Finder/Find_one-10 172.8n ± 26% 129.3n ± 2% -25.18% (p=0.002 n=6) Finder/Find_none-10 174.0n ± 1% 130.6n ± 0% -24.94% (p=0.002 n=6) ```
This commit is contained in:
parent
f4f21f5ea3
commit
52561d561a
1 changed files with 1 additions and 3 deletions
|
@ -45,9 +45,7 @@ func putSearchID(sid *searchID) {
|
|||
sid.dp = nil
|
||||
sid.peq = nil
|
||||
sid.eqer = nil
|
||||
for k := range sid.seen {
|
||||
delete(sid.seen, k)
|
||||
}
|
||||
clear(sid.seen)
|
||||
searchIDPool.Put(sid)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue