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

Hervé Boutemy updated MNG-6572:
-------------------------------
    Fix Version/s:     (was: 3.6.x-candidate)
                   3.6.1

> use int or long instead of BigIntegers for little numbers in ComparableVersion
> ------------------------------------------------------------------------------
>
>                 Key: MNG-6572
>                 URL: https://issues.apache.org/jira/browse/MNG-6572
>             Project: Maven
>          Issue Type: Improvement
>          Components: Artifacts and Repositories, Performance
>    Affects Versions: 3.6.0
>            Reporter: Hervé Boutemy
>            Priority: Major
>              Labels: up-for-grabs
>             Fix For: 3.6.1
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> while working on MNG-6571, we found that this could enhance performance when 
> many versions are compared: perhaps not in Maven builds, since this is 
> probably negligible, but in other scenario where version comparison is used, 
> this could be useful
> see 
> https://github.com/apache/maven/blob/master/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
> for every Integer, a BigInteger is currently used
> but for integer that have less than 10 digits, an int would be sufficient and 
> would be a lot more efficient
> and for integers that are less than 19 digits, a long would be the way to go
> the biggest numbers we get usually is the timestamp of a SNAPSHOT, like 
> {{20171015.230843}} (YYYYMMDD.HHmmss), then an int will be sufficient in the 
> vast majority of case



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to