Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/iWdGo/GoCompilerEfficiency

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/iWdGo/GoCompilerEfficiency

  • v0.0.0-20190924115738-b91b1e7e44c4
  • Source
  • Go
  • Socket score

Version published
Created
Source

Go Report Card

Benchmarking good practices

Go is strong typed and object oriented by definition. To distinguish bad habits, benchmarking against the compiler performance is often convincing.

Logic

Math

  • math.Log2() is the most efficient to check that 2 is the sole divisor.

Arrays

Templates

Buffers

  • No difference when writing to file
  • Returning a buffer as a string is marginally more expensive.
  • Package io is much more efficient than fmt which offers many more possibilities:
  • When handling every byte of a buffer, use ReadByte.

Builder

FAQs

Package last updated on 24 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc