3 ms·
But that would only be possible if you write out all the struct fields you are accessing into function parameters. If the struct is complex with a lot of fields
by bugbuddy 3y ago
But that would only be possible if you write out all the struct fields you are accessing into function parameters. If the struct is complex with a lot of fields, then you would end up with a messy function signature. Also, I am sure there is a limit to how many parameters you can have before this optimization stops working.
- loeg 3y ago> But that would only be possible if you write out all the struct fields you are accessing into function parameters. If the struct is complex with a lot of fields, then you would end up with a messy function signature. This is the approach the article's author took.