mosche commented on PR #22182: URL: https://github.com/apache/beam/pull/22182#issuecomment-1181703588
I already tested / profiled the code with `for (int i =...)`, that didn't make any difference. > A larger improvement would come from getting rid of the sink/switch statements and writing the code directly to read/write the fields directly The switch statements were only used once during setup to stack functions together to read the final value according to the schema. Though it still reduced the overhead a bit replacing that with explicit code 👍 Explicit `readField`: <img width="805" alt="Screenshot 2022-07-12 at 14 15 17" src="https://user-images.githubusercontent.com/1401430/178489843-e3e9d49e-0b64-4cfc-b7d1-fb37b22d08b4.png"> Previous generated sink: <img width="800" alt="Screenshot 2022-07-12 at 14 15 54" src="https://user-images.githubusercontent.com/1401430/178489871-47a41e51-c64b-4f9d-a53a-05751d126d8b.png"> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
