[ 
https://issues.apache.org/jira/browse/DIRMINA-529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Trustin Lee updated DIRMINA-529:
--------------------------------

    Attachment: Primitive.java

I modified the Primitive.java you provided me, and got the following result:

Elapsed method 1 = 35200
Elapsed method 2 = 6
Elapsed method 3 = 4168
Elapsed method 1 = 35895
Elapsed method 2 = 1
Elapsed method 3 = 4128
Elapsed method 1 = 29329
Elapsed method 2 = 0
Elapsed method 3 = 3730
...

I also changed the order of each tests (i.e. 3->1->2), but didn't find any 
difference.  So far, isPrimitive() seems to ourperform all alternatives.

I'm on Linux with SUN JDK 1.6.0_05 Server VM.

> use isPrimitive() instead of comparing the string to a list of primitives
> -------------------------------------------------------------------------
>
>                 Key: DIRMINA-529
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-529
>             Project: MINA
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.0.0-M1
>            Reporter: Stefan Ackermann
>            Assignee: Trustin Lee
>            Priority: Minor
>             Fix For: 2.0.0-M2
>
>         Attachments: mina-patch.txt, Primitive.java, Primitive.java, 
> Primitive.java
>
>
> isPrimitive is a native function and should be used to determine whether a 
> class is primitive instead of comparing to a list of known primitive class 
> names

-- 
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