News for hackers. Stuff that matters.
Re:Generics can make your Go code slower by chrisseaton on Thursday March 31, 2022 @07:05AM (#30865858)
> No, outside special code it is impossible to know at compile time how many heap allocation a function will have.

Huh?

    def foo:
      return [new Object, new Object]
That'll always bump the TLAB three times. Why not bump it one time for all objects?

> The stack has the requirement that its size must be known at compile time for each function.

Also huh?

For example a local array that has a dynamic size.

There are no comments on this comment yet.