hm that seems unlikely as the c++ api is really just that. The code it interfaces with is just the same that the python api uses. Does the python equivalent of your code also slow down once you change the input sizes?