godot icon indicating copy to clipboard operation
godot copied to clipboard

GDScript: Remove unused values from `Token`

Open HolonProduction opened this issue 6 months ago • 1 comments

  • Token.source only usage was to initialize Token.identifier which we can do directly.
  • We only use Token.cursor_place but not Token.cursor_position.

Size of Token on my PC:

  • before: 72 bytes
  • after removing the unused values: 64 bytes
  • when placing the Variant at the end: 56 bytes (in my setup Variant has an alignment of 8 requiring additional padding when the values before it don't add to a multiple of 8)

HolonProduction avatar Jul 28 '24 00:07 HolonProduction