# Go: The price of interface{}

DevFeed: [Go: The price of interface{}](<https://devfeed.tech/articles/go-the-price-of-interface-35407.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/go-the-price-of-interface/>)

Author: Graham King

Published: 2015-05-26T23:43:48Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [interface](<https://devfeed.tech/topics/interface.md>), [Code](<https://devfeed.tech/topics/code.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [garbage-collection](<https://devfeed.tech/tags/garbage-collection.md>), [go](<https://devfeed.tech/tags/go.md>), [interface](<https://devfeed.tech/tags/interface.md>), [memory](<https://devfeed.tech/tags/memory.md>), [software](<https://devfeed.tech/tags/software.md>)

## AI overview

The article explains that Go's empty interface accepts values of any type, but converting values to an interface can allocate memory and increase garbage-collection work. It demonstrates the issue with logging examples, benchmarks, and assembly output, and advises caution in frequently executed code.

## Source excerpt

Go's empty interface: Flexibility at a cost.