Hi Brad!<br><br><div class="gmail_quote">2013/4/24 Bradley Lucier <span dir="ltr"><<a href="mailto:lucier@math.purdue.edu" target="_blank">lucier@math.purdue.edu</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On 04/24/2013 12:37 PM, Zhen Shen wrote:</div></blockquote><div><br></div><div>[...]</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">

> Now, doing (declare (flonum)) at the top level, does this stop gambit<br>
> from boxing flonums across function calls?<br>
<br>
</div>No.  Gambit keeps flonums unboxed inside a basic block, whenever there's<br>
a jump (or the possibility of a jump), Gambit boxes up all the<br>
still-needed flonums.<br></blockquote><div><br></div><div>What about fixnums, would they remain unboxed in a loop?</div><div><br></div><div>Also btw, are there any tricks that can be applied to make it keep flonums and fixnums unboxed in loops, like, (declare (not interrupts-enabled)) or (not safe)?<br>

<br></div><div><br></div><div><br></div><div>Btw, there was a conversation on the following like ~4y ago though I don't remember the conclusion:</div><div><br></div><div>In a context where the user is allowed to enter any value, what's the most performant way to ensure the value is made a flonum or integer?</div>

<div><br></div><div>(Or, you made some nice calculation that made use of the numeric tower's exactness but you get to a point where you want to ensure a proper cast to flonum or integer:)</div><div><br></div><div>I.e,. what's the fastest way to do (exact->inexact n) and (inexact->exact (floor n)) respectively, where examples for n are 5 5. 3/7 1e25 ? :)</div>

<div><br></div><div>If I remember right from that conversation there were some Huge differences in performance between different approaches, like 500x.</div><div><br></div><div><br></div><div>Brgds,</div><div>Mikael</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
Brad<br>
_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
</div></div></blockquote></div><br>