[ 
https://issues.apache.org/jira/browse/TINKERPOP-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16144098#comment-16144098
 ] 

ASF GitHub Bot commented on TINKERPOP-1759:
-------------------------------------------

Github user dkuppitz commented on a diff in the pull request:

    https://github.com/apache/tinkerpop/pull/699#discussion_r135584747
  
    --- Diff: 
tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/TinkerGraphPerformanceTest.java
 ---
    @@ -0,0 +1,53 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.tinkerpop.gremlin.tinkergraph.process.traversal;
    +
    +import 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
    +import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
    +import org.apache.tinkerpop.gremlin.util.TimeUtil;
    +import org.junit.Test;
    +
    +import static org.hamcrest.Matchers.is;
    +import static org.hamcrest.Matchers.lessThan;
    +import static org.junit.Assert.assertThat;
    +
    +/**
    + * @author Daniel Kuppitz (http://gremlin.guru)
    + */
    +public class TinkerGraphPerformanceTest {
    +
    +    /**
    +     * Check the traverser's hashcode() implementation if this test fails. 
hashcode() should
    +     * not generate too many hash collisions.
    +     */
    +    @Test
    +    public void sacksWithoutMergerShouldBeFast() {
    --- End diff --
    
    Hmm, I'm not sure how to rewrite the test using the `inject()` approach. 
The following snippet shows no performance issues at all:
    
    ```
    strategies = new DefaultTraversalStrategies()
    strategies.addStrategies(SackStrategy.build().initialValue({1}).create())
    
    t = __.inject((1..8192).toArray()).barrier(); []
    t.asAdmin().setStrategies(strategies)
    t.asAdmin().applyStrategies()
    t.iterate()
    ```


> Improve hashcode and equals for Traverser implementations
> ---------------------------------------------------------
>
>                 Key: TINKERPOP-1759
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1759
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.2.6
>            Reporter: Daniel Kuppitz
>            Assignee: Daniel Kuppitz
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to