Thank you that makes sense. Vectors are fixed length so in theory could I also say a Vector is possibly more performant than an equivalent list?
Ken On Thursday, October 27, 2016 at 12:58:06 PM UTC-4, Jon Zeppieri wrote: > On Thu, Oct 27, 2016 at 12:16 PM, Ken MacKenzie <devil...@gmail.com> wrote: > This is a question more about the footprint of each. Deep down is a Struct > really just syntactic sugar over a list. > > > Not in Racket (or in most Lisps these days). > > > As in most things in Lisp from my understanding are all just lists, it is > the basic building block of all data. Is a struct also just a list and the > element names enumerations of the fields by position. > > > > In terms of its representation in memory, a Racket struct is more like a > vector than a list. > > > > Basically I am trying to figure out, without writing a benchmark test, if > there is any processing overhead in using a struct instead of a list with > enumerated field names. > > > > It should generally be more efficient to access an arbitrary struct field > than an arbitrary list member. > > > > Ken > > > > -- > > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users...@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.