Unfortunately, in-place function is deprecated. Perhaps using similar function and additional memory will be faster. I'll check it later.