This optimizes a common pattern like: if s != "" { ... } to: if len(s) != 0 { ... } This avoids a runtime call and thus produces slightly better code.