Re: [PATCH 2/3] add basic lua infrastructure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 25, 2012 at 08:55:23AM +0700, Nguyen Thai Ngoc Duy wrote:

> On Tue, Sep 25, 2012 at 7:25 AM, Jeff King <peff@xxxxxxxx> wrote:
> > +ifdef USE_LUA
> > +       BASIC_CFLAGS += -DUSE_LUA `pkg-config --cflags lua5.2`
> > +       EXTLIBS += `pkg-config --libs lua5.2`
> > +endif
> > +
> 
> I remember we paid noticeable penalty when linking with libcurl to
> main git binary and Linus removed libcurl from main git, moving it to
> git-http-*. Do we pay similar penalty linking to liblua?

I don't think so. The real problem with libcurl is that it brings in a
ton of other libraries:

  $ ldd /usr/lib/x86_64-linux-gnu/libcurl.so | awk '{print $1}'
  linux-vdso.so.1
  libidn.so.11
  libssh2.so.1
  liblber-2.4.so.2
  libldap_r-2.4.so.2
  librt.so.1
  libgssapi_krb5.so.2
  libssl.so.1.0.0
  libcrypto.so.1.0.0
  librtmp.so.0
  libz.so.1
  libc.so.6
  libgcrypt.so.11
  libresolv.so.2
  libsasl2.so.2
  libgnutls.so.26
  libpthread.so.0
  /lib64/ld-linux-x86-64.so.2
  libkrb5.so.3
  libk5crypto.so.3
  libcom_err.so.2
  libkrb5support.so.0
  libdl.so.2
  libkeyutils.so.1
  libgpg-error.so.0
  libtasn1.so.3
  libp11-kit.so.0

Compare with lua:

  $ ldd /usr/lib/x86_64-linux-gnu/liblua5.2.so | awk '{print $1}'
  linux-vdso.so.1
  libm.so.6
  libdl.so.2
  libc.so.6
  /lib64/ld-linux-x86-64.so.2

The original timings from Linus are here:

  http://article.gmane.org/gmane.comp.version-control.git/123946

The main issue is really hitting all those libraries on a cold cache.
Here are before-and-after timings of:

  echo 3 >/proc/sys/vm/drop_caches && git

which should basically just measure startup time. All times are
best-of-five.

  [before]
  real    0m0.065s
  user    0m0.000s
  sys     0m0.004s

  [after]
  real    0m0.063s
  user    0m0.000s
  sys     0m0.004s

So we actually did better, though the difference is well within the
run-to-run noise. I don't think it's a big deal.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]