Did you ran it multiple times?
The current results on google colab are:

Which would mean that they are ~the same with the actual code in the backward.
My point was more that running the script multiple times still gives too much variance to draw conclusion. This is what I get on my machine:
$ python workspace/dev-pytorch/test/tmp.py 
vanilla forward: 0.0001763, vanilla backward: 0.0003210
custom  forward: 0.0001498, custom  backward: 0.0003045
$ python workspace/dev-pytorch/test/tmp.py 
vanilla forward: 0.0001494, vanilla backward: 0.0002869
custom  forward: 0.0001435, custom  backward: 0.0003164
$ python workspace/dev-pytorch/test/tmp.py 
vanilla forward: 0.0001242, vanilla backward: 0.0002429
custom  forward: 0.0001492, custom  backward: 0.0002765
$ python workspace/dev-pytorch/test/tmp.py 
vanilla forward: 0.0001547, vanilla backward: 0.0002743
custom  forward: 0.0001138, custom  backward: 0.0002271
$ python workspace/dev-pytorch/test/tmp.py 
vanilla forward: 0.0001221, vanilla backward: 0.0002303
custom  forward: 0.0001534, custom  backward: 0.0002434
$ python workspace/dev-pytorch/test/tmp.py 
vanilla forward: 0.0001413, vanilla backward: 0.0002763
custom  forward: 0.0001706, custom  backward: 0.0003036
$ python workspace/dev-pytorch/test/tmp.py 
vanilla forward: 0.0001231, vanilla backward: 0.0002354
custom  forward: 0.0001527, custom  backward: 0.0002881
$ python workspace/dev-pytorch/test/tmp.py 
vanilla forward: 0.0001215, vanilla backward: 0.0001913
custom  forward: 0.0001504, custom  backward: 0.0002560
$ python workspace/dev-pytorch/test/tmp.py 
vanilla forward: 0.0001071, vanilla backward: 0.0002042
custom  forward: 0.0001372, custom  backward: 0.0002434