[ 
https://issues.apache.org/jira/browse/THRIFT-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672076#action_12672076
 ] 

Bryan Duxbury commented on THRIFT-318:
--------------------------------------

I will probably get rid of the Extent subclass all together. It was used mostly 
as part of my first attempt that used a list of Extents instead of the extent 
array. 

I implemented the Set interface not just for the iterable-ness of it, but also 
for the conceptual guarantee that it contains no duplicates and has a 
contains() method. The fact that it has a bunch of unimplemented methods makes 
it no different than a Set wrapped with Collections.unmodifiableSet(), except 
that it's inherently unmodifiable.

> Performance of HashSet for enumeration VALID_VALUES seems poor
> --------------------------------------------------------------
>
>                 Key: THRIFT-318
>                 URL: https://issues.apache.org/jira/browse/THRIFT-318
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: thrift-318.patch
>
>
> It looks like using a HashSet for the VALID_VALUES set we now put in 
> enumerated types was a bad move, performance-wise. There's a fair amount of 
> HashSet/HashMap/Integer overhead generated.
> I think that the VALID_VALUES should still be a Set, but we can make a 
> TIntRangeSet or something internal to Thrift that's more efficient for our 
> usecases and save some CPU.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to