I don't generally answer "what's faster?" questions, because my answer is generally "it depends" or "who cares?". There are better ways to improve startup time.
However, I sometimes do use require instead of use to avoid loading modules until they're really needed to save memory and time. In the Perl core, you'll often see the idiom of loading Carp before croak()ing.
As for your second question, use B::Deparse and marvel that the optimizer removes code branches that can never be reached!
In reply to Re: what's faster: use or require
by chromatic
in thread what's faster: use or require
by dreamy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |