I've done some measurements with the master ReplaySubject:

**RxJava master**
Primitive baseline (i.e., passing in an object with a long field to bypass boxing): 248.000.000 ops/sec
Autoboxed baseline: 67.000.000 ops/sec
Autoboxed speed: 950.000 ops / sec
Primitive speed: 4.200.000 ops / sec

With OperationReplay.createBuffered(10M):
Autoboxed speed: 905.000 ops / sec
Primitive speed: 3.400.000 ops/ sec

**Initial buffer size effect**

Tests were run with default memory settings (256MB) and with the improved version.

| Size | Autoboxed Ops/sec | Primitive ops/sec |
|-------:|----------:|-----------:|
| 16 | 4.000.000 | 12.172.000 |
| 32 | 4.505.000 | 10.523.584 |
| 64 | 5.413.000 | 10.523.000 |
| 128 | 5.571.000 | 10.674.000 |
| 256 | 5.993.000 | 8.214.000 |
| 512 | 4.135.000 | 9.447.000 |
| 1024 | 5.369.000 | 11.940.000 |
| 2048 | 5.470.000 | 11.956.000 |
| 4096 | 4.803.000 | 8.288.000 |
| 8192 | 5.339.000 | 8.993.000 |
| 16k | 5.456.000 | 9.304.000 |
| 32k | 4.098.000 | 10.466.000 |
| 64k | 4.357.000 | 10.486.000 |
| 128k | 5.416.000 | 10.651.000 |
| 256k | 5.504.000 | 10.795.000 |
| 512k | 5.074.000 | 8.192.000 |

The conclusion is that when capacity can be set, it could mean an additional ~30% operations per second.

I've also run with only 1M iteration so it won't hit the GC limit that often.

| Size | Autoboxed Ops/sec | Primitive ops/sec |
|-------:|----------:|-----------:|
|16| 6.440.000| 11.319.000 |
|32| 7.250.000| 11.933.000 |
|64| 7.147.000|  10.277.000 |
|128 | 7.488.000 | 10.810.000 |
| 256 | 7.080.000 | 11.696.000 |
| 512 | 7.034.000 | 10.197.000 |
| 1k | 6.955.000 | 12.024.000 |
| 2k | 6.642.000 | 11.948.000 |
| 4k | 7.093.000 | 11.838.000 |
| 8k | 6.911.000 | 10.351.000 |
| 16k | 6.267.000 | 11.763.000 |
| 32k | 6.927.000 | 11.763.000 |
| 64k | 6.808.000 | 10.194.000 |
| 128k | 6.317.000 | 11.279.000 |
| 256k | 6.693.000 | 11.729.000 |
| 512k | 6.661.000 | 13.184.000 |
| 1M | 8.143.000 | 15.311.000 | 

If the history doesn't hit the GC limit that often, it performs around 7 Mops, except when the buffer is exaclty the size of the repetition.