Loading ...
Sorry, an error occurred while loading the content.

Re: Heavy Performance degradation on linux

Expand Messages
  • rmsanjiv
    ... Hi Ric, Statically linked library runs pretty fast similar to shared library on solaris. I wonder why this issue is specific to only shared library on
    Message 1 of 4 , Dec 15, 2004
    • 0 Attachment
      --- In antlr-interest@yahoogroups.com, Ric Klaren <ric.klaren@g...> wrote:
      > On Wed, 15 Dec 2004 22:42:25 -0000, rmsanjiv <rmsanjiv@h...> wrote:
      > > When I build antlr with -fPIC options and create a shared library for
      > > my application and use that to parse expressions then there is
      > > tremendous slow down ONLY on linux. It runs around 200X faster on sun
      > > machines. Is there any known issue in that regard.
      >
      > This sounds like a linux kernel or a compiler problem, some more specs
      > could be helpfull. I would recommend building statically if speed is
      > an issue. It would be interesting to see the speed difference on linux
      > between a shared and statically linked lib (for reference)
      >
      > Cheers,
      >
      > Ric

      Hi Ric,

      Statically linked library runs pretty fast similar to shared library
      on solaris. I wonder why this issue is specific to only shared library
      on linux. Any clue?

      Regards,
      Sanjiv
    • Ric Klaren
      ... First there s the issue that for -fPIC usually a number of restrictions are put on the generated code to make it relocatable. For some architectures this
      Message 2 of 4 , Dec 16, 2004
      • 0 Attachment
        On Thu, 16 Dec 2004 00:05:09 -0000, rmsanjiv <rmsanjiv@...> wrote:
        > Statically linked library runs pretty fast similar to shared library
        > on solaris. I wonder why this issue is specific to only shared library
        > on linux. Any clue?

        First there's the issue that for -fPIC usually a number of
        restrictions are put on the generated code to make it relocatable. For
        some architectures this is good, for some others it is bad. It could
        also be due to some custom patches on the kernel you use (SELinux
        maybe?) I'm personally not aware that these give a slowdown but I
        could suspect it.

        Without any more information on the compiler you use or the kernel I
        cannot say anything.

        Cheers,

        Ric
      Your message has been successfully submitted and would be delivered to recipients shortly.