Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yaml pre compiled deserialize improvement #118

Closed
rube200 opened this issue Jul 20, 2024 · 4 comments
Closed

Yaml pre compiled deserialize improvement #118

rube200 opened this issue Jul 20, 2024 · 4 comments

Comments

@rube200
Copy link
Contributor

rube200 commented Jul 20, 2024

Hello there,
i was messing around with transpilerm and IL, and found out that switch in Deserialize could be improved.

This code:

codeWriter.AppendLine("parser.Read(); // skip key");
codeWriter.AppendLine("parser.SkipCurrentNode(); // skip value");

could be replaced to codeWriter.AppendLine("goto default");

As you can see by this iamge (IL code), it created the same code again and again instead of jumping for default labek
image

@hadashiA
Copy link
Owner

Thanks for pointing this out.
I would like to understand the issue clearly - is it a question of increasing the amount of code?
My understanding is that it doesn't seem to affect the speed of execution, is my perception correct?

@rube200
Copy link
Contributor Author

rube200 commented Jul 22, 2024

Yes, this issue should not affect execution speed.
This issue just affect compiled file sizes per field

@hadashiA
Copy link
Owner

Ok, personally I don't think it's that big a deal, give me a pull request and I'll merge it in.

@hadashiA
Copy link
Owner

hadashiA commented Aug 1, 2024

Merged #119

@hadashiA hadashiA closed this as completed Aug 1, 2024
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

No branches or pull requests

2 participants