You're only using this variable once, maybe you should just do:

```
return decode(_ptr[0 .. R.length], _index); 
```