Skip to content

[feature] Consider compiling Perl with no-semantic-interposition when available #17963

@atoomic

Description

@atoomic

As described in this article from RedHat about speeding up Python

RedHat starts compiling python using the -fno-semantic-interposition flag which is available since gcc 5.3.
Compiling with -fno-semantic-interposition leads to a 30% speedup for Python.

I wonder if such improvements would be true with Perl too.

Notice the reduction of assembly code instructions when using -fno-semantic-interposition.

There are a few drawbacks in using that flag, among them using LD_PRELOAD.

I do not think this would be an issue for Perl and XS code.

I'm trying to gather some feedbacks from the community.

  • Any reasons we should not consider using -fno-semantic-interposition
  • Did some of you already experimented compiling Perl with this flag?
  • Should we consider promoting this flag as default when available?

I will experiment it soon and provide some benchmark metrics here later.

thanks for any input.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions