How can I compile my Perl script so to reduce startup time?

后端 未结 6 2031
旧时难觅i
旧时难觅i 2020-12-18 12:04

Is there a way to save a compiled version of my perl scripts?

Or a way to do a JavaScript style compile where you just remove comments, whitespace, etc?

6条回答
  •  粉色の甜心
    2020-12-18 12:20

    Do you realize that Javascript is minified to save bandwidth, not startup time or runtime? And that the practice of minifying Javascript started in the times of dialup connections?

    Sure, there was a time where interpreted programs were often minified like that, but back then typical CPUs were Z80s and 8086's running at 4-8 MHz, and using loads of cycles to execute a single instruction. To show: my Athlon XP-M 2400 is ~10,000 times faster than my 8MHz 8086 for CPU-bound programs.

提交回复
热议问题