Skip to content

1.31.0 Releaase

Choose a tag to compare

@dwgebler dwgebler released this 30 Jun 21:59

Debugging

  • The VS Code debugger now sets breakpoints inside concurrent worker bodies:
    async.run / async.all / async.race workers, generator bodies, and
    network request handlers, in addition to the main script. Each running
    worker appears as its own thread in the Call Stack pane; hitting a
    breakpoint stops all threads, Continue resumes them, and a step advances
    only the selected thread.

Performance

  • String index (s[i]), substring / slice, and length() now cache rune
    offsets for strings longer than 256 bytes, making each access amortized O(1)
    and a character-scanning loop O(n) instead of O(n^2). Shorter strings are
    rescanned per access with a maximum scan of 256 bytes. The cache is
    concurrency-safe and memory-bounded, with no API change.