BUG: rolling_apply(..., center=True) should not append NaNs
Closes #8269.

@stahlous, could you please review? Thanks.
 @seth-p can you do a perf check
 @jreback, afraid I haven't managed to get vbench running (on Windows). I can try some simple tests with `%timeit`.
 right I remember that!

ok, just use the existing vbench (and timeit manually then - just the relevant ones obviously!)

report and non-trivial changes
 Sorry for being dense, but I don't follow "just use the existing vbench".
 @seth-p what I mean was copy-past the vbench code (for a rolling operation that is applicable here) to ipython and timeit :)

that said - if you feel the need to add a vbench go ahead (this is just a confirmation)
 I'm traveling today. I'll review when I get a chance, which might be a day
or two.
On Sep 15, 2014 11:37 AM, "seth-p" notifications@github.com wrote:

> @stahlous https://github.com/stahlous, could you please review? Thanks.
> 
> —
> Reply to this email directly or view it on GitHub
> https://github.com/pydata/pandas/pull/8275#issuecomment-55636361.
 Afraid I'm not quite sure about the vbench thing, but did some simple `timeit()` timing. I think the times are comparable.

```
        from timeit import timeit
        for n in [10, 1000, 10000]:
            for win in [3, 100, 1000]:
                number = 100000 // n
                print("n={:6,}, win={:5,}, number={:6,}, time={}s".format(n, win, number,
                    timeit("rolling_apply(s, {}, sum, center=True)".format(win),
                           "from pandas import Series, rolling_apply;"
                           "s = Series(1., index=range({}));".format(n),
                           number=number)))
```

master:

```
n=    10, win=    3, number=10,000, time=0.892670777595987s
n=    10, win=  100, number=10,000, time=0.7224112964259015s
n=    10, win=1,000, number=10,000, time=0.9323838644810276s
n= 1,000, win=    3, number=   100, time=0.1426375056860203s
n= 1,000, win=  100, number=   100, time=1.099650529073028s
n= 1,000, win=1,000, number=   100, time=0.023143675721702284s
n=10,000, win=    3, number=    10, time=0.13533986676669185s
n=10,000, win=  100, number=    10, time=1.2150394992196825s
n=10,000, win=1,000, number=    10, time=10.009422737328038s
```

with this PR:

```
n=    10, win=    3, number=10,000, time=0.8404246091626536s
n=    10, win=  100, number=10,000, time=0.6828260001602349s
n=    10, win=1,000, number=10,000, time=0.8512381454336704s
n= 1,000, win=    3, number=   100, time=0.14204423939089583s
n= 1,000, win=  100, number=   100, time=1.0980743344128223s
n= 1,000, win=1,000, number=   100, time=0.02169394742574715s
n=10,000, win=    3, number=    10, time=0.14353667491456878s
n=10,000, win=  100, number=    10, time=1.2034883528451288s
n=10,000, win=1,000, number=    10, time=10.038638784916468s
```
 ok, looks ok. @seth-p ready?
 Yep, I think so.

> On Sep 17, 2014, at 8:44 AM, jreback notifications@github.com wrote:
> 
> ok, looks ok. @seth-p ready?
> 
> —
> Reply to this email directly or view it on GitHub.
 thanks!
