With active work going on in wikidiff2, I'm creeped out by it being in C++ which isn't known for being very safe against buffer overflows and other memory safety issues. It would be cool if it were in a language that doesn't have these problems.
Possible solutions:
- Stick to PHP implementation. Last time I checked, it was roughly an order of magnitude slower than our current wikidiff2. On pathologically bad inputs, however, DifferenceEngine activates an improved algorithm that cuts a few corners and can be even faster than the straightforward algo used by wikidiff2 - at the expense of somewhat worse (at least theoretically) results.
- Keep it a PHP extension. The only real candidate here is Rust which can easily create shared libraries callable from C/C++. This also appears to be the fastest C++ alternative available.
- Use some other language. That would require doing diffs via a service. Note that our standard language used for services - Node.js - is roughly in PHP ballpark performance wise.