Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • G go
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • 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

Switch branch/tag
  • go
  • src
  • cmd
  • link
  • internal
  • ld
  • lib.go
Find file BlameHistoryPermalink
  • Than McIntosh's avatar
    cmd/link: memoize/cache whether plugin.Open symbol available · b1a20253
    Than McIntosh authored Sep 04, 2019
    Perform a single lookup of "plugin.Open" at the point where we set the
    loaded flag for the context, then cache whether the result is nil, so
    that we can consult this cached value later on (instead of having to
    look up the symbol each time). This helps speed up the DynLinkingGo()
    context method, which is called from within some very hot loops in the
    linker (when linking 'hyperkube' from kubernetes, reduces total calls
    to "sym.(*Symbols).ROLookup" from 6.5M to 4.3M)
    
    Change-Id: I92a2ea2b21d24f67aec0a7afeef4acc77c095adf
    Reviewed-on: https://go-review.googlesource.com/c/go/+/193260
    
    Reviewed-by: default avatarJeremy Faller <jeremy@golang.org>
    Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
    b1a20253

Replace lib.go

Attach a file by drag & drop or click to upload


Cancel
GitLab will create a branch in your fork and start a merge request.
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7