<div dir="ltr"><div><div>I think it used to be a lot more expensive then it is now. The tests that I've run finds structs to be (slightly) more expensive, although nothing too major (depending on your definition of major.)<br><br></div>Here is one (admittedly very simple) tests that does show a difference (for me anyway)).<br><br><a href="https://github.com/LeifAndersen/experimental-methods-in-pl/tree/master/exp7">https://github.com/LeifAndersen/experimental-methods-in-pl/tree/master/exp7</a><br><br>> In some simple tests I’ve done, I haven’t found struct allocation to be 
any more expensive than vector allocation of equivalent size.<br><br></div>I'd be very interested in seeing these tests if they're available.<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><br></div>~Leif Andersen</div></div></div>
<br><div class="gmail_quote">On Wed, Jan 14, 2015 at 3:09 PM, Alexis King <span dir="ltr"><<a href="mailto:lexi.lambda@gmail.com" target="_blank">lexi.lambda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When using the optimization coach, it sometimes gives me this message:<br>
<br>
> This struct constructor is used in hot code. Allocating structs is expensive, consider using vectors instead. To keep the same interface, consider defining macro wrappers around the vector operations that have the same name as the struct constructor and accessors.<br>
<br>
<br>
Is this really all that accurate? In some simple tests I’ve done, I haven’t found struct allocation to be any more expensive than vector allocation of equivalent size. What are the situations in which this holds to be true?<br>
____________________<br>
  Racket Users list:<br>
  <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</blockquote></div><br></div>