-
Notifications
You must be signed in to change notification settings - Fork 803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TINKERPOP-1349: RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics. #349
Conversation
…le time. Fixed a bug in BranchStep around child integration.
NOTE: This can not go into |
… Barrier, then there is no need to add a NoOpBarrier on the last loop serialization. Also, discovered a severe clone() bug in AbstractStep around label cloning. Can't believe this never popped up before now.
…fAssignableClass as it just wastes clock cycles. Also, came up with a cleaner algorithm for determing whether the final NoOpBarrierStep should be added or not. Faster and less memory usage.
VOTE: +1 |
…meterized sections of a test. I think all our Strategy tests should have a 'isFaster' test to ensure that our optimizations are actually making things faster. cc/ @dkuppitz.
…StrategyTest now do parameter sweeps and test a broader range of behaviors.
Travis is failing - looks like an issue from Rat - missing an Apache header in @okram I don't think there's a way to get a Parameterized test to run a single test once. It pretty much treats the whole test case as parameterized when you use that feature. Using @pietermartin do you intend to vote on this one? you had a fair number of comments/questions on the JIRA ticket.... |
@spmallette No I do not intend to vote. The questions were about understanding why the barrier steps were needed and then to understand why barrier/bulking has such a significant performance impact. I have not read the |
All tests pass with VOTE +1 |
Same here, |
https://issues.apache.org/jira/browse/TINKERPOP-1349
RepeatUnrollStrategy
is a Standard-only strategy that will unroll arepeat()
into a linear form if and only if it has a known loop amount (e.g.times(2)
). That isrepeat(out()).times(2)
becomesout().barrier().out().barrier()
. Thebarrier()
insertions are necessary asrepeat()
itself is a barrier step and also, the benefit of bulking is leveraged.RepeatUnrollStrategy
removes the need forRepeatStep
,RepeatEndStep
, andLoopTraversal
.RepeatUnrollStrategyTest
ensures that unrolling is faster than not-unrolling. Here are some runtimes. The first item in the Pair is the runtime and the second item is the amount of unique objects being processed. With more unique objects, the faster it gets. Note that at 10 unique elements (tiny traversal), sometimes rolled is faster than unrolled and vice versa (i.e. they are equal).Also in this ticket, I fixed a bug in
BranchStep
where children were not being integrated and thus, susceptible to clone-problems. Moreover, I added a timing test toIdentityRemovalStrategyTest
. @spmallette, do you know how to make a test run once and only once in aParameterized
test case? If so, can you updateIdentityRemoveStrategyTest
andRepeatUnrollStrategyTest
accordingly?VOTE +1.