public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Christian Weiss <Christian.Weiss@EMEA.NEC.COM>
Cc: "libc-help@sourceware.org" <libc-help@sourceware.org>,
	 Felix Uhl <Felix.Uhl@EMEA.NEC.COM>
Subject: Re: Runtime discrepancy clock_gettime + funcition instrumentation
Date: Thu, 29 Jul 2021 09:31:47 +0200	[thread overview]
Message-ID: <87fsvx60f0.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <5175db58f09c413b9c652d5dc45a2248@EUX13SRV2.EU.NEC.COM> (Christian Weiss's message of "Thu, 29 Jul 2021 07:26:14 +0000")

* Christian Weiss:

> Measuring the runtime, the static binary takes about five times more time to finish than the dynamic one. I do not yet understand this observation:
>
> [cweiss@amd022 overhead]$ time ./test_time_static_gcc.x 10000000
> sum: 49999995000000
> real         0m2.594s
> user        0m0.396s
> sys           0m2.197s
> [cweiss@amd022 overhead]$ time ./test_time_dyn_gcc.x 10000000
> sum: 49999995000000
>
> real         0m0.518s
> user        0m0.515s
> sys           0m0.002s

Have you checked that the statically linked version uses vDSO
acceleration instead of system calls?

Thanks,
Florian


  reply	other threads:[~2021-07-29  7:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29  7:26 Christian Weiss
2021-07-29  7:31 ` Florian Weimer [this message]
2021-07-29  8:18   ` Christian Weiss
2021-07-29  8:20     ` Florian Weimer
2021-07-29  8:29       ` Christian Weiss

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=87fsvx60f0.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=Christian.Weiss@EMEA.NEC.COM \
    --cc=Felix.Uhl@EMEA.NEC.COM \
    --cc=libc-help@sourceware.org \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).