Homec4science

Micro-optimize idx()

Authored by vrana <jakubv@fb.com> on Jun 8 2012, 00:20.

Description

Micro-optimize idx()

Summary:
Do we call this function often enough to justify some speed tricks?

Tested in Zend PHP 5.4 (median of 3 runs):

idx($array, 'present'); // 36% faster
idx($array, 'missing'); // 23% faster
idx($array, 'missing', false); // 21% slower

Test Plan: New test.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2672

Details

Committed
vrana <jakubv@fb.com>Jun 8 2012, 02:27
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU28b632563311: Add stub for PhutilSymbolLoader::loadClass()
Branches
Unknown
Tags
Unknown

Event Timeline

vrana <jakubv@fb.com> committed rPHU38b9380b9e76: Micro-optimize idx() (authored by vrana <jakubv@fb.com>).Jun 8 2012, 02:27