wiki.techinc.nl/includes/parser
Tim Starling 5235082095 Explored some ideas for HipHop optimisation. Made a preprocessor implementation, based on a copy of Preprocessor_Hash, with a preprocessToObj() which is optimised. It takes 33% less time than Preprocessor_Hash for a certain realistic test case (the Barack Obama article). Some notes about what I did:
* Set EnableHipHopSyntax=true to enable string and integer type hints. I gave the file a .hphp extension to avoid false alarms in syntax checking scripts. 
* Made sure almost all the local variables in preprocessToObj() have a specific type, instead of being variants. This is useful for integers, but has the largest impact for objects, since dynamic method calls can be avoided. 
* Stopped using extract() since it forces all local variables to be variants, and adds some hashtable initialisation overhead.
* Found a way to cast a variant to a specific object class, by abusing argument type hinting. The method does not require special syntax; it is harmless in Zend PHP.
* Wrapped various internal function calls with type casts. strspn() and substr() need to be wrapped with intval() and strval() respectively, since they return a variant to support special error return values. HipHop isn't smart enough to know whether the error case will be triggered.
* Replaced most instances of double-equals with triple-equals. Profiling indicates that this makes a very large difference when comparing strings, much more so than in Zend.
2011-06-02 02:44:33 +00:00
..
CoreLinkFunctions.php Remove @static from all over the place. That's what the static keyword is for, this being PHP5 and all 2011-04-21 00:07:09 +00:00
CoreParserFunctions.php Fix function level comments that start with /* not /** 2011-05-21 19:35:16 +00:00
CoreTagHooks.php And even more documentation in various files 2011-05-29 14:25:20 +00:00
DateFormatter.php * (bug 28511) Use [] syntax instead of {} for string offset access 2011-04-17 07:59:58 +00:00
LinkHolderArray.php And even more documentation in various files 2011-05-29 14:25:20 +00:00
Parser.php The big regex at doMagicLinks deserves being more thoroughly studied. 2011-05-31 21:52:39 +00:00
Parser_DiffTest.php More return type documentation 2011-02-08 23:18:13 +00:00
Parser_LinkHooks.php Some HipHop fixes: 2011-05-27 06:25:21 +00:00
ParserCache.php And even more documentation 2011-05-28 18:59:42 +00:00
ParserOptions.php bug 29123: record use of the "editsection" option so that users who can't edit (or have section edit links disabled) get a different cache key; also simplify freaky code layout (briefly tested, seem to work) 2011-05-27 18:51:26 +00:00
ParserOutput.php And even more documentation, the last of this batch 2011-05-28 19:00:01 +00:00
Preprocessor.php And even more documentation, the last of this batch 2011-05-28 19:00:01 +00:00
Preprocessor_DOM.php Revert r88997: fix for bug 93 caused some additional problems. 2011-06-02 00:32:43 +00:00
Preprocessor_Hash.php Revert r88997: fix for bug 93 caused some additional problems. 2011-06-02 00:32:43 +00:00
Preprocessor_HipHop.hphp Explored some ideas for HipHop optimisation. Made a preprocessor implementation, based on a copy of Preprocessor_Hash, with a preprocessToObj() which is optimised. It takes 33% less time than Preprocessor_Hash for a certain realistic test case (the Barack Obama article). Some notes about what I did: 2011-06-02 02:44:33 +00:00
StripState.php And even more documentation, the last of this batch 2011-05-28 19:00:01 +00:00
Tidy.php More parameter documentation!! 2011-05-28 15:59:57 +00:00