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

Proposal: add none implement for Pretouch under arm arch. #301

Closed
xiekeyi98 opened this issue Sep 23, 2022 · 2 comments · Fixed by #306
Closed

Proposal: add none implement for Pretouch under arm arch. #301

xiekeyi98 opened this issue Sep 23, 2022 · 2 comments · Fixed by #306

Comments

@xiekeyi98
Copy link
Contributor

Now functions like Pretouch only compile under amd64.
https://github.com/bytedance/sonic/blob/main/sonic.go#L1

How about using the conditional compilation to provide a none implement under arm64?
(I think it will be helpful for some users to develop their code which not use conditional compilation to use Pretouch feature under Apple M1.

It will be like

build !amd64


// None Implement for !amd64
func Pretouch(vt reflect.Type, opts ...option.CompileOption) error {
	 return nil.
}
@AsterDY
Copy link
Collaborator

AsterDY commented Sep 23, 2022

Thanks for the feedback. We will add it on our next version

@xiekeyi98
Copy link
Contributor Author

xiekeyi98 commented Sep 23, 2022 via email

xiekeyi98 added a commit to xiekeyi98/sonic that referenced this issue Sep 26, 2022
AsterDY pushed a commit that referenced this issue Sep 28, 2022
* feat: 🎸 (sonic.go): Add none implement for !amd64 arch

✅ Closes: #301

* Add test

* Address comment
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

Successfully merging a pull request may close this issue.

2 participants