Alternative rollup implementation for the rust branch

This is an alternative implementation of #46.
Can be simplified to 
```python
p = -1 if self.batched() else 0
```