perf: optimise <v> cell value parsing#622
Open
alexander-beedie wants to merge 1 commit intotafia:masterfrom
Open
perf: optimise <v> cell value parsing#622alexander-beedie wants to merge 1 commit intotafia:masterfrom
<v> cell value parsing#622alexander-beedie wants to merge 1 commit intotafia:masterfrom
Conversation
6ee0b2e to
7a1535d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #611 (optimising
xlsxcell value reads) for a further ~8-10% performance gain for typical reads.Optimisation
When reading "n", "s", "b", and "e" values with
read_value, these types are guaranteed to be plain ASCII so we can bypass thexml10_contentand UTF8/String overhead and deal directly with them as raw bytes. (Other types fall-through to the usual path, with the necessary additional handling).s: integer index (into shared string table)n: numeric literalb: booleane: errorPerformance
Note: these tests are on mixed-type data; if you have a workbook with nothing but strings that aren't in the shared string table, you won't see the same gains. These timings should be fairly representative of real world data though.
The gain here is additive with #621 (the code being updated is entirely disjoint), so when combined we're looking at about another ~25% speedup1 over the latest release for typical workbooks.
Footnotes
Benchmarked on: Apple Silicon M3 Max ↩