Commit Graph
2 Commits
Author SHA1 Message Date
Raja R Harinath bcc7b46795 * interpreter.cs (Interpreter.GenerateMatch): Avoid allocating two
intermediate arrays to build the final result.
(Interpreter.GetGroupInfo, Interpreter.PopulateGroup): New helper
functions.
* CaptureCollection.cs (list): Change from ArrayList to list.
(SetValue): New internal helper, used by Interpreter.PopulateGroup.
(Enumerator): Remove helper class.
(IEnumerator.GetEnumerator): Just use list.GetEnumerator.
* GroupCollection.cs: Likewise.
* Group.cs (Group): Move responsibility of populating 'Captures'
to Interpreter.PopulateGroup.
* Match.cs (Match): Move responsibility of populating 'Groups' to
Interpreter.GenerateMatch.

This reduced the time for 100000 iterations of the 'regex'[1] benchmark
from 63s to 53s.

svn path=/trunk/mcs/; revision=45757
2005-06-10 13:54:07 +00:00
Raja R Harinath 0db5645ea7 In System.Text.RegularExpressions:
* Capture.cs, Group.cs, Match.cs: New files split out of ...
	* match.cs: ... this.  Remove.

In .:
	* System.dll.sources: Update to reflect split-up of
	System.Text.RegularExpressions/match.cs.

svn path=/trunk/mcs/; revision=44793
2005-05-20 05:44:45 +00:00