String pooling
AssigneeSap SE
InventorOliver Goetz
Life of this patent
Estimating the term…
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.
Claims18
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.
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.
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.
Dependencies are inferred from the claim text.