| Summary: | Use std::swap() in HashTable::swap() | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Zan Dobersek <zan> | ||||
| Component: | New Bugs | Assignee: | Zan Dobersek <zan> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | benjamin, cmarcelo, commit-queue | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Zan Dobersek
2014-02-18 14:04:55 PST
Created attachment 224544 [details]
Patch
Comment on attachment 224544 [details]
Patch
It's nice to not reinvent the wheel! Thanks for catching this.
Do we know if this gives any tiny microptimization based on the compiler being able to do moves instead of all of the copying? We probably don't measure enough to tell.
Using Clang, Parser/HTML5-8266-ParseOnly.html runs about ~1% faster when using libc++ (not substantial, but measurable) and regresses slightly when using libstdc++. Haven't tested with GCC. Comment on attachment 224544 [details] Patch Clearing flags on attachment: 224544 Committed r164378: <http://trac.webkit.org/changeset/164378> All reviewed patches have been landed. Closing bug. |