"40% faster?" Sure, but the original code doesn't make much sense. The whole purpose of a B-tree is that you store the keys in a contiguous array to take advantage of locality. If you're going to spread your data around behind pointers you're better suited using a node-based balanced binary search tree (red-black tree, AVL, treap).
This is of course still very exciting to see though! It's a great demonstration that there's some data structures that was impossible to implement properly (and generically) without native support in the language.