The patch is provide according to wiki. The source follows the description at tutorial.
However, from the mailing list it shows that this version is not optimized. So is there any chance anyone can point out which algorithm may provide better result for this construct? I am happy to work on it, though it may take some time.