Date: Fri, 27 Mar 2015 17:03:11 -0600 From: Alan Somers <asomers@freebsd.org> To: Adrian Chadd <adrian@freebsd.org> Cc: Eric van Gyzen <vangyzen@freebsd.org>, "current@freebsd.org" <current@freebsd.org>, Jilles Tjoelker <jilles@stack.nl> Subject: Re: SSE in libthr Message-ID: <CAOtMX2g6OqrbzvqLFZyr7jJHC4MZOQFPTDDmpkuXVi1ps=zmaw@mail.gmail.com> In-Reply-To: <CAJ-Vmomr2kV832oMcGd2OF3yXRFUGJu2DncSvG9mTbrWVgPwOA@mail.gmail.com> References: <5515AED9.8040408@FreeBSD.org> <20150327214057.GA3766@stack.nl> <CAJ-Vmomr2kV832oMcGd2OF3yXRFUGJu2DncSvG9mTbrWVgPwOA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 27, 2015 at 4:36 PM, Adrian Chadd <adrian@freebsd.org> wrote: > hi, > > please don't try to microoptimise crap like strlen(). > > The TL;DR for performant high-throughput code is: if strlen() or > memcpy() is the thing that's costing you the most, you're doing it > wrong. > > > > -adrian I respectfully disagree. A well-optimized libc will benefit _every_single_program_ that uses strlen. That includes Apache, Samba, Memcached, Quake, and basically every single program that every single FreeBSD user uses. There's no reason that 3rd party software maintainers should have to rewrite basic libc functions in order to get decent performance on FreeBSD. And the downsides are so small! In 2015, we should assume by default that most userland software is using SIMD instructions. As Eric noticed, Clang emits them freely. What's the point to lazily saving the SSE registers on context switches if essentially all programs compiled from Ports will be using those registers anyway? I agree with Jilles; I think we should always save the SSE registers for userland programs. -Alan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2g6OqrbzvqLFZyr7jJHC4MZOQFPTDDmpkuXVi1ps=zmaw>