-
Notifications
You must be signed in to change notification settings - Fork 2
Comparing changes
Open a pull request
base repository: StringEpsilon/PhpSerializerNET
base: main
head repository: StringEpsilon/PhpSerializerNET
compare: ReworkTokenizer
- 11 commits
- 64 files changed
- 1 contributor
Commits on Jul 22, 2024
-
Split the tokenizer into a validator and tokenizer.
The main benefit is reduced memory allocations, as we now count the tokens during the validation step and then work off of a flat array without nesting children. I have also slightly loosened the coupling between tokenizer and deserializer. Lastly there has been some housekeeping with naming and file locations.
Configuration menu - View commit details
-
Copy full SHA for d601072 - Browse repository at this point
Copy the full SHA d601072View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1792a1e - Browse repository at this point
Copy the full SHA 1792a1eView commit details
Commits on Jul 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2de1f7a - Browse repository at this point
Copy the full SHA 2de1f7aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f3a72a - Browse repository at this point
Copy the full SHA 2f3a72aView commit details -
Deserializer: Initialize collection types with proper length.
Saves some time and allocation.
Configuration menu - View commit details
-
Copy full SHA for f3ddadd - Browse repository at this point
Copy the full SHA f3ddaddView commit details -
Configuration menu - View commit details
-
Copy full SHA for c744a13 - Browse repository at this point
Copy the full SHA c744a13View commit details
Commits on Jul 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f384f55 - Browse repository at this point
Copy the full SHA f384f55View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a6cb96 - Browse repository at this point
Copy the full SHA 1a6cb96View commit details
Commits on Jul 25, 2024
-
Deserialization: Some more performance improvements.
- Do not get the PhpDataType and switch on that, intead directly switch on the relevant input byte. - In the validator: Increment the token count only in the array and object methods. - Tokenizer: Add AggressiveOptimization hint to GetToken().
Configuration menu - View commit details
-
Copy full SHA for 64e67a8 - Browse repository at this point
Copy the full SHA 64e67a8View commit details -
Performance: Do the input re-encoding faster.
Also: For small inputs, we can stackalloc the byte array. Updated changelog to reflect the performance status.
Configuration menu - View commit details
-
Copy full SHA for 5e6032e - Browse repository at this point
Copy the full SHA 5e6032eView commit details -
Performance: Don't copy the input bytes as string to the PhpToken.
This reduces memory allocation for doubles, bools and floats, as they can be directly evaluated from the raw bytestream. That also speeds up deserialization by a lot. We also no longer have to give the Tokenizer the input encoding. There are probably some further optimizations to be had in the deserializer -> DeserializeTokenFromSimpleType() method too.
Configuration menu - View commit details
-
Copy full SHA for f7ea9cd - Browse repository at this point
Copy the full SHA f7ea9cdView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...ReworkTokenizer