in reply to Re: Re: Re: Re: Circular buffer instead of shift/push
in thread Circular buffer instead of shift/push
You have a bug in your code. Instead of 'and'ing with $m you need to use $m-1.
Also, you as you used '$m' instead of '4' it might just be that Perl does not optimize it. You can either try to replace it with the number or add 'use constant'.
Your analysis is interesting though.
Cheers.
|
---|