[ https://issues.apache.org/jira/browse/TINKERPOP-1180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15187344#comment-15187344 ]
ASF GitHub Bot commented on TINKERPOP-1180: ------------------------------------------- GitHub user okram opened a pull request: https://github.com/apache/incubator-tinkerpop/pull/254 TINKERPOP-1180: Add more optimized binary operators to Operator https://issues.apache.org/jira/browse/TINKERPOP-1180 This is simple. Added `Operator.sumLong` which bypasses using `NumberHelper`. Smart when you know you are summing longs as in `CountGlobalStep`. I also tweaked the initial capacity of the singleton maps of the `GroupXXXSteps`. As we need more Operators, we can just CTR add them. Its trivial. `mvn clean install`. VOTE +1. You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-tinkerpop TINKERPOP-1180 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-tinkerpop/pull/254.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #254 ---- commit 0d79c2ff7cb89a0fd81f2a2aa555d6d024a6de70 Author: Marko A. Rodriguez <okramma...@gmail.com> Date: 2016-03-09T16:22:44Z Added Operator.sumLong for use by CountGlobalStep. I couldn't get SingletonMap to work for the GroupXXXSteps. Instead, just made the HashMap they generate have an initial capacity of 1. ---- > Add more optimized binary operators to Operator. > ------------------------------------------------ > > Key: TINKERPOP-1180 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1180 > Project: TinkerPop > Issue Type: Improvement > Components: process > Affects Versions: 3.1.1-incubating > Reporter: Marko A. Rodriguez > > We currently have {{Operator}} enum which has nice operators like {{add}}, > {{assign}}, {{sum}}, {{max}}, {{min}}, etc. The problem with lots of the > number-based implementations is that they reason about the number format > using {{NumberHelper}}. I think we should add {{sumLong}}, {{sumInteger}}, > and the like to allow classes the leverage {{Operator}} to bypass > number-type-reasoning when they know it will be a long, integer, etc. > This is important for {{GraphComputer.Memory}} where reducers are binary > operators and we use {{Operator}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)