mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Denys Vlasenko <vda.linux@googlemail.com>
To: musl <musl@lists.openwall.com>
Subject: Re: Re: [PATCH] x86_64/memset: simple optimizations
Date: Tue, 10 Feb 2015 21:52:54 +0100	[thread overview]
Message-ID: <CAK1hOcOHNCjPmqE1uq=OCbpckXz-xFJx_gcQ4Q-TKHgKGVEP-Q@mail.gmail.com> (raw)
In-Reply-To: <20150210204342.GJ23507@brightrain.aerifal.cx>

On Tue, Feb 10, 2015 at 9:43 PM, Rich Felker <dalias@aerifal.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@aerifal.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.


  reply	other threads:[~2015-02-10 20:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1423258814-9045-1-git-send-email-vda.linux@googlemail.com>
     [not found] ` <20150207003535.GS23507@brightrain.aerifal.cx>
     [not found]   ` <CAK1hOcP8zCo843y0VhqMr6Wc0JtaD4V4V=TicLnmJ6SynBhmGw@mail.gmail.com>
     [not found]     ` <20150207130655.GW23507@brightrain.aerifal.cx>
2015-02-10 20:27       ` Denys Vlasenko
2015-02-10 20:43         ` Rich Felker
2015-02-10 20:52           ` Denys Vlasenko [this message]
2015-02-10 20:54             ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK1hOcOHNCjPmqE1uq=OCbpckXz-xFJx_gcQ4Q-TKHgKGVEP-Q@mail.gmail.com' \
    --to=vda.linux@googlemail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).