String pooling
First Claim
1. An article comprising non-transitory machine-readable media embodying instructions that when performed by one or more machines result in operations comprising:
- obtaining a start index and a length for a subset of a text sequence buffered within a parser;
polling a string pool containing a plurality of pooled string objects to determine whether any of the pooled string objects contain the subset of the text sequence buffered within the parser by using the start index and the length;
using one of the pooled string objects if it contains the subset of the text sequence, otherwise, initiating a generation of a new pooled string object in the string pool containing the subset of the text sequence;
obtaining a second start index and a second length for a second subset of the text sequence buffered within the parser;
polling the string pool containing the plurality of pooled string objects to determine whether any of the pooled string objects contain the second subset of the text sequence buffered within the parser by using the second start index and the second length; and
using one of the pooled string objects if it contains the second subset of the text sequence, otherwise, initiating a generation of a new pooled string object in the string pool containing the second subset of the text sequence.
2 Assignments
0 Petitions
Accused Products
Abstract
A start index and a length are obtained for a subset of a text sequence buffered within a parser. A string pool containing a plurality of pooled string objects is polled to determine whether any of the pooled string objects contain the subset of the text sequence buffered within the parser by using the start index and the length. One of the pooled string objects is used if it contains the subset of the text sequence, otherwise, the generation of a new pooled string object in the string pool containing the subset of the text sequence is initiated. Related techniques, apparatus, systems, and articles are described.
13 Citations
18 Claims
-
1. An article comprising non-transitory machine-readable media embodying instructions that when performed by one or more machines result in operations comprising:
-
obtaining a start index and a length for a subset of a text sequence buffered within a parser; polling a string pool containing a plurality of pooled string objects to determine whether any of the pooled string objects contain the subset of the text sequence buffered within the parser by using the start index and the length; using one of the pooled string objects if it contains the subset of the text sequence, otherwise, initiating a generation of a new pooled string object in the string pool containing the subset of the text sequence; obtaining a second start index and a second length for a second subset of the text sequence buffered within the parser; polling the string pool containing the plurality of pooled string objects to determine whether any of the pooled string objects contain the second subset of the text sequence buffered within the parser by using the second start index and the second length; and using one of the pooled string objects if it contains the second subset of the text sequence, otherwise, initiating a generation of a new pooled string object in the string pool containing the second subset of the text sequence. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method comprising:
-
obtaining a start index and a length for a subset of a text sequence buffered within a parser; polling a string pool containing a plurality of pooled string objects to determine whether any of the pooled string objects contain the subset of the text sequence buffered within the parser by using the start index and the length; using one of the pooled string objects if it contains the subset of the text sequence, otherwise, initiating a generation of a new pooled string object in the string pool containing the subset of the text sequence; obtaining a second start index and a second length for a second subset of the text sequence buffered within the parser; polling the string pool containing the plurality of pooled string objects to determine whether any of the pooled string objects contain the second subset of the text sequence buffered within the parser by using the second start index and the second length; and using one of the pooled string objects if it contains the second subset of the text sequence, otherwise, initiating a generation of a new pooled string object in the string pool containing the second subset of the text sequence. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A computing system comprising:
-
a processor; a memory coupled to the processor; wherein the memory encodes one or more programs that cause the processor to perform operations comprising; obtaining a start index and a length for a subset of a text sequence buffered within a parser; polling a string pool containing a plurality of pooled string objects to determine whether any of the pooled string objects contain the subset of the text sequence buffered within the parser by using the start index and the length; using one of the pooled string objects if it contains the subset of the text sequence, otherwise, initiating a generation of a new pooled string object in the string pool containing the subset of the text sequence; obtaining a second start index and a second length for a second subset of the text sequence buffered within the parser; polling the string pool containing the plurality of pooled string objects to determine whether any of the pooled string objects contain the second subset of the text sequence buffered within the parser by using the second start index and the second length; and using one of the pooled string objects if it contains the second subset of the text sequence, otherwise, initiating a generation of a new pooled string object in the string pool containing the second subset of the text sequence. - View Dependent Claims (14, 15, 16, 17, 18)
-
Specification