Add note about optimizing structs to the TR docs.
This commit is contained in:
parent
e3274a3cf7
commit
1cf57b893c
|
@ -154,3 +154,8 @@ fashion as @racket[car] and @racket[cdr].
|
|||
(vector-ref x color-name) ; good
|
||||
(vector-ref x (* 0 10)) ; bad
|
||||
)
|
||||
|
||||
In many such cases, however, @seclink[#:doc '(lib
|
||||
"scribblings/guide/guide.scrbl") "define-struct"]{structs} are
|
||||
preferable to vectors. Typed Racket can optimize struct access in all
|
||||
cases.
|
||||
|
|
Loading…
Reference in New Issue
Block a user