Skip to content

Instantly share code, notes, and snippets.

@okram
Created July 18, 2014 20:35
Show Gist options
  • Save okram/3b20e33193f7550045bb to your computer and use it in GitHub Desktop.
Save okram/3b20e33193f7550045bb to your computer and use it in GitHub Desktop.
EXISTING JUMP STEP
gremlin> t = System.currentTimeMillis(); g.V().out().out().out().iterate(); System.currentTimeMillis() - t
==>900
gremlin> t = System.currentTimeMillis(); g.V.as('x').out().jump('x'){it.loops < 3}.iterate(); System.currentTimeMillis() - t
==>5513
gremlin> g.V().out().out().out().count()
==>14465066
gremlin> g.V.as('x').out().jump('x'){it.loops < 3}.count()
==>14465066
///////////////////////
JUMP STEP WITH LESS makeSibling() CALLS
gremlin> t = System.currentTimeMillis(); g.V().out().out().out().iterate(); System.currentTimeMillis() - t
==>881
gremlin> t = System.currentTimeMillis(); g.V.as('x').out().jump('x'){it.loops < 3}.iterate(); System.currentTimeMillis() - t
==>5364
gremlin> g.V().out().out().out().count()
==>14465066
gremlin> g.V.as('x').out().jump('x'){it.loops < 3}.count()
==>14465066
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment