Skip to content

Scan until next special char (", \, \0, \c, \L) and append that slice once.#25498

Open
planetis-m wants to merge 2 commits intonim-lang:develfrom
planetis-m:patch-37
Open

Scan until next special char (", \, \0, \c, \L) and append that slice once.#25498
planetis-m wants to merge 2 commits intonim-lang:develfrom
planetis-m:patch-37

Conversation

@planetis-m
Copy link
Contributor

Benchmark comparison (-d:danger --mm:arc --debugger:native -d:useMalloc,
OpenAI file benchmark, 5 runs):

  • Before: 0.196674934, 0.189423191, 0.198763300, 0.197125584, 0.205015032
  • After: 0.182827130, 0.183330852, 0.174878542, 0.174360811, 0.181704921
  • Median before: 0.197125584s
  • Median after: 0.181704921s
  • Improvement: 7.82% faster

Callgrind comparison (same build flags):

  • Total Ir before: 3,219,477,120
  • Total Ir after: 2,449,556,167
  • Total Ir reduction: 23.91%

parseString hotspot:

  • Before: 1,343,343,723 Ir
  • After: 573,423,735 Ir
  • Reduction: 57.31%

if (s and 0xfc00) == 0xdc00 and s > 0:
r = 0x10000 + (((r - 0xd800) shl 10) or (s - 0xdc00))
else:
my.err = errInvalidToken
Copy link
Contributor Author

@planetis-m planetis-m Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I will add these back if the tests pass.

@planetis-m
Copy link
Contributor Author

Error: undeclared identifier: 'copyMem'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant