This package provides optimal algorithms (O(N^2)) for hierarchical clustering, including single linkage, complete linkage, average linkage, weighted linkage, and Ward's method. Benchmarks of average linkage can be found here:
https://github.com/kaizhang/clustering. I hope this would be useful in general.
Motivation of this work: I found the "hierarchical-clustering" library cannot handle large input (>10^4) due to its suboptimal algorithms.