Conclusion: calling functions through reflection in Go is about 1000 times slower than calling them directly. Pre-saving the reflection objects of functions has almost no impact on performance, as the time-consuming part is concentrated in calling the Call method of the reflection objects.
|
|
Output is
|
|