|
Message-ID: <CAK1hOcOHNCjPmqE1uq=OCbpckXz-xFJx_gcQ4Q-TKHgKGVEP-Q@mail.gmail.com> Date: Tue, 10 Feb 2015 21:52:54 +0100 From: Denys Vlasenko <vda.linux@...glemail.com> To: musl <musl@...ts.openwall.com> Subject: Re: Re: [PATCH] x86_64/memset: simple optimizations On Tue, Feb 10, 2015 at 9:43 PM, Rich Felker <dalias@...ifal.cx> wrote: > On Tue, Feb 10, 2015 at 09:27:17PM +0100, Denys Vlasenko wrote: >> On Sat, Feb 7, 2015 at 2:06 PM, Rich Felker <dalias@...ifal.cx> wrote: >> /* libc has incredibly messy way of doing this, >> * typically requiring -lrt. We just skip all this mess */ >> static void get_mono(struct timespec *ts) >> { >> syscall(__NR_clock_gettime, CLOCK_MONOTONIC, ts); >> } > > FWIW, this is a bad idea; you get syscall overhead in your > measurements. If you just use clock_gettime (the function) you'll get > vdso results (no syscall). I repeat memset 32 times between reading timespamp. Thus, even with "small" 20kb memset test there are 640kb of writes to L1. This is bit enough to make overhead insignificant.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.