Re: Heavy Performance degradation on linux
- --- In firstname.lastname@example.org, Ric Klaren <ric.klaren@g...> wrote:
> On Wed, 15 Dec 2004 22:42:25 -0000, rmsanjiv <rmsanjiv@h...> wrote:Hi Ric,
> > 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)
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?
- On Thu, 16 Dec 2004 00:05:09 -0000, rmsanjiv <rmsanjiv@...> wrote:
> Statically linked library runs pretty fast similar to shared libraryFirst there's the issue that for -fPIC usually a number of
> on solaris. I wonder why this issue is specific to only shared library
> on linux. Any clue?
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.