Skip to content

Further optimize string table parsing - #37

Merged
Marlamin merged 1 commit into
wowdev:masterfrom
Ovahlord:tableoptimize
Nov 15, 2026
Merged

Marlamin merged 1 commit into
wowdev:masterfrom
Ovahlord:tableoptimize

Conversation

@Ovahlord

@Ovahlord Ovahlord commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Now that we have gotten rid of .NET Standard 2.1, we can fully embrace the juiciness of .NET span features.
We start off by further optimizing the string table parsing.

Prior to this change, we had to scan every single byte of the string table buffer for null terminators. Naturally this is very slow.

.NET has solved this problem already by introducing Span.IndexOf. This is a SIMD optimized way to search for a specific byte so we are now processing multiple bytes with a single call which significantly speeds up the parsing of large string tables.


there are further ways to improve this which would require larger refactors:

…ng every single byte for a null terminator manually
@Marlamin

Marlamin commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

For these kind of reworks, is there any chance you can supply before/after benchmarks? This one is relatively minor so seems fine to merge as-is, I think, but it'd be good to know what "significantly speeds up" means going forward.

Reading a string from the string table when actually reading records seems like the logical next step to me personally, but would indeed require larger reworks/additional testing especially given string table reading wonkiness on WDCx variants.

@Marlamin
Marlamin merged commit d51e1d6 into wowdev:master Nov 15, 2026
1 check passed
@Ovahlord

Ovahlord commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

I absolutely can. I want to do this especially when coming back to unboxing value type fields as this is the greatest remaining bottleneck.

Also I want to expand dbcd with async workflows so we can squeeze even more out of the parsing speed

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.

2 participants