Similarly, SymForce examines sparsity of individual matrices and jacobians at code generation time, so that operations with sparse matrices are similarly one instruction per op - at runtime there's no looping or indirection through sparse data structures or allocations of sparse matrices in the optimization loop. There's definitely a cross-over point where dimensions become large enough that TF / JAX / etc will be the tool to use - we'd love to provide some more benchmarks and comparisons here. For the first two experiments in the paper (see Tables II and III), we do compare to JAX and amortizing across a batch size of 1000, SymForce is still way ahead. We tried to be careful, but the code is available so please come beat up our numbers.
This put the problem outside of L2 and thus is not a fair comparison, especially if your problem is small enough to fit in L1.
In addition, XLA does a poor job in optimizing for CPU cache reuse, so I'm not surprised that directly transcoded C++ code would be much faster than XLA.
However, TensorFlow code can directly run on GPU. SymForce cannot.
SymForce is not trying to compute on large data-parallelism, but it could generate an inner kernel for that. In that way it complements TensorFlow nicely.
In the paper it is briefly mentioned that TensorFlow/JAX are slower due to more overhead? I doubt this is true. Also, TensorFlow could be compiled to TF-lite or XLA and then C++ or whatever you like. Same for JAX.
It is also mentioned that TensorFlow/JAX perform poorly on second-order optimization. But this is not true.
Further, it is said that TensorFlow/JAX have poor performance for sparse matrices. While the performance is not great, I am not sure that other frameworks would perform faster.
Some fair benchmarks would be nice.
But then, despite just benchmarks, also a more direct comparison on a conceptual level would be nice. Because from the description, I don't directly understand how it is much different.