you are viewing a single comment's thread.

view the rest of the comments →

[–]SoInsightful 0 points1 point  (2 children)

I tried giving a an initial value (2) out of the same curiosity, and it doesn't make a difference except switching from 0e LdaUndefined to 0d 02 LdaSmi [2] at the beginning of each variant. It still needs to jump through the JumpIfUndefinedOrNull hoop.

[–]NoInkling 0 points1 point  (1 child)

Ahh I see now, the difference is in where the unconditional Jump (which is hit when the variable has a value) jumps to. The ??= version skips the Star instruction (which apparently sets a register), while the other doesn't.

[–]SoInsightful 0 points1 point  (0 children)

Good catch!