Skip to content

Rust question about array reference #5028

Answered by zhang2014
JasonLi-cn asked this question in Q&A
Discussion options

You must be logged in to vote

In the test, improve the performance if change &[StateAddr] to StateAddrs. There is no particularly accurate answer, just guess that &[StateAddr] will cause rust to create StateAddrs slice and get slice ref.

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@Xuanwo
Comment options

@JasonLi-cn
Comment options

@sundy-li
Comment options

@PsiACE
Comment options

Comment options

You must be logged in to vote
3 replies
@JasonLi-cn
Comment options

@zhang2014
Comment options

@zhang2014
Comment options

Answer selected by Xuanwo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants