Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • G go
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • go
  • Repository
  • go
  • src
  • encoding
  • xml
  • xml.go
Find file BlameHistoryPermalink
  • Brian Smith's avatar
    encoding/xml: avoid an allocation for tags without attributes · 8f02df76
    Brian Smith authored Feb 07, 2015
    Before, an array of size 4 would always be allocated even if a tag
    doesn't have any attributes. Now that array is allocated only if
    needed.
    
    benchmark              old allocs     new allocs     delta
    BenchmarkUnmarshal     191            176            -8.5%
    
    Change-Id: I4d214b228883d0a6e892c0d6eb00dfe2da84c116
    Reviewed-on: https://go-review.googlesource.com/4160
    
    
    Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
    8f02df76
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7