<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">If there was a benefit, then the following approach would make sense to me:<div class=""><br class=""></div><div class="">- Have both Vector and SmallVector. SmallVector will use unsigned internally.</div><div class=""><br class=""></div><div class="">- Use SmallVector in the places where sizeof(Vector) matters. This would take some effort but I think that we have the tools that would be needed to be systematic about it.</div><div class=""><br class=""></div><div class="">- Both Vector and SmallVector will have an API based on size_t. SmallVector will do truncation checks in all of the places.</div><div class=""><br class=""></div><div class="">-Filip</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 20, 2014, at 11:32 AM, Geoffrey Garen <<a href="mailto:ggaren@apple.com" class="">ggaren@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class="">I wonder what the downsides are to this approach. Footprint of Vector?</div></div></div></div></blockquote><div class=""><br class=""></div></div>It looks like the original change was motivated by shrinking Vector:<div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span><a href="https://bugs.webkit.org/show_bug.cgi?id=97268" class="">https://bugs.webkit.org/show_bug.cgi?id=97268</a></div><div class=""><br class=""></div><div class="">Sadly, it didn’t include any data on the observed benefit :(.</div><div class=""><br class=""></div><div class="">Geoff</div></div></div></blockquote></div><br class=""></div></body></html>