performance - How does Swift type inference affect compile and run time? -
var number = 3
vs
var number: int = 3
how using specific types vs type inference affect compile time? has done experiments or math on topic?
does runtime affect @ in anyway?
compile time: in cases, trivial. in example, 3 integer literal; integer literals can adapt use, it's trivial number have type int.
at runtime, there absolutely no difference. both statements 100 percent equivalent.
Comments
Post a Comment