-
Notifications
You must be signed in to change notification settings - Fork 360
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
Too many Pretouch
s will cost a large amount of time
#703
Comments
Pretouch
s will cost a large amount of time
could you try the option:
reference: https://github.com/bytedance/sonic?tab=readme-ov-file#pretouch |
Yeah, i recommend using |
I test the cost of Pretouch of the same type on different CPU, but the cost difference is too huge. Apple M3 54.792µs How can be this? Is't because the test is running in a docker and the cpu is oversold? I'm fall down. |
There are two problems:
|
I set an environment variable by |
yeah, you can try the non-jit implementation by the environment and pretouch is faster In x86_64: has two impelemts: In aarch64: the only default implement is NON-JIT NON-JIT implement compare to JIT |
I conducted some experiments and gathered data, which led me to a few conclusions:
Therefore, in most cases, using non-JIT is sufficient, particularly when it's uncertain whether the CPU supports JIT. Does my conclusion seem correct? The data was measured on
|
yeah, the conclusion is similar to our tests. thanks for your test data. In the future (actually not short), we may remove jit, but we need to fix the performance problem in marshal. |
OK, thank you for your reply, it's truly an honor to take part in Sonic's discussion. Salute to your work! |
In our case, a project has almost 3000 structs, and structs will more and more in the future. That will cost a large amount of time if all types are pretouched. In one project, it will cost almost 5 minutes. So what can we do to reduce this cost?
The text was updated successfully, but these errors were encountered: