Package org.python.core.util
Class StringCounter
java.lang.Object
org.python.core.util.StringCounter
Not for application use, this class may be used to count how many times a
String
occurs a point in the runtime. We use this to investigate optimisations of the handling of
strings in the runtime, principally to avoid checks for byte-nature where that is already known.-
Constructor Summary
-
Method Summary
-
Constructor Details
-
StringCounter
public StringCounter()
-
-
Method Details
-
count
Count this occurrence.- Parameters:
s
- to count
-
top
Report the topn
counts.- Parameters:
n
- number of counts to retrieve- Returns:
- counts of the top
n
strings.
-
top
Report the top n counts.
-