<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>On Sep 23, 2014, at 7:42 AM, Jim Grosbach <<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>> wrote:</div><div><br></div><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 23, 2014, at 1:29 AM, Chandler Carruth <<a href="mailto:chandlerc@google.com" class="">chandlerc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Sep 22, 2014 at 9:38 PM, Alex Rosenberg <span dir="ltr" class=""><<a href="mailto:alexr@leftfield.org" target="_blank" class="">alexr@leftfield.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is your answer the same if we're talking about an asm version of zlib that's faster than the compiled version? Because that's a thing.</blockquote></div><br class="">If zlib is our bottleneck... wow we have bigger issues.</div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">And as we work on a compiler, I kinda hope we can produce a reasonable blob of asm in most cases. If not, we should probably get on that.</div></div></div></blockquote><div><br class=""></div><div>Dang it. Beaten to the punch. I was just going to ask for a bug report that we apparently generate suboptimal code for that. :)</div><div><br class=""></div><div>Taking my trolling hat back off, I actually am interested in whether it’s reasonable for the compiler to do significantly better here (and on other similar kinds of code). Alex, can you elaborate a bit?</div></div></blockquote><br><div>Zlib has been written in asm a few times over, just check the distribution.</div><div><br></div><div>I haven't looked too closely at the code, but from my recollection of someone in my team writing a SPU version, it's pretty much a set of transforms that if a compiler could do them would be considered "heroic optimizations" and likely not the sort of thing we'd put in LLVM.</div><div><br></div><div>Alex</div></body></html>