Skip to main content

Timeline for Rotating array members

Current License: CC BY-SA 3.0

10 events
when toggle format what by license comment
Feb 6, 2014 at 23:16 history edited konijn CC BY-SA 3.0
added 69 characters in body
Feb 6, 2014 at 14:06 comment added user36275 looks like we have a winner jsperf.com/rotate-array-javascript
Feb 5, 2014 at 22:10 comment added user36275 And it gets progressively slower when there are more players in the original array.
Feb 5, 2014 at 22:05 comment added user36275 Take a look, maybe I'm doing something wrong. But your proposed solution is 63% slower. jsperf.com/rotate-array
Feb 5, 2014 at 22:03 comment added user36275 Thanks. Btw, my version is much faster than shift and push you proposed.
Feb 5, 2014 at 21:59 comment added konijn Probably I would use seatings and newSeatings ?
Feb 5, 2014 at 21:51 comment added user36275 what would you call players_new? p.s. I need original array too.
Feb 5, 2014 at 21:47 history edited konijn CC BY-SA 3.0
added 159 characters in body
Feb 5, 2014 at 21:44 comment added user36275 I need to read more about built in capabilities of javascript :)
Feb 5, 2014 at 21:40 history answered konijn CC BY-SA 3.0