{typecode, value}
pair. Unlike Go https://research.swtch.com/interfaces, TinyGo will not precompute a list of function pointers for fast interface method calls. Instead, all interface method calls are looked up where they are used. This may sound expensive, but it sometimes avoids memory allocation at interface creation.Global variables are computed during compilation whenever possible (unlike Go, which does not have the equivalent of a .data
section). This is an important optimization for several reasons:
constant
. This makes sure they can be stored in flash instead of RAM.if
that depends on a global variable).