Friday, 4 September 2015 12:00
20 minutes
Beginner
English
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