Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
YAPC::EU 2015 - Optimize Perl5 code for performance freaks.

No reason. We just need code that makes processing faster! Yes! We are performance freak.

In this talk, I'll talk about tips of how to write code in perl that makes processing faster.

Topics:

  • XS vs PP implementation
    • Example: DateTime vs Time::Piece vs Time::Moment
    • Example: Time::Strptime
  • Instance cache
    • How to cache URI instance?
    • How to cache DateTime instance?
  • Suppress memory copy.
    • use constant.pm
    • alias of value. (e.g. @_, Scalar::Alias, experimental::refaliasing)
  • Pros and cons of a string eval.
    • Example: Apache::LogFormat::Compiler
  • Optimize regular expressions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.