ayena.de

libidn vs. ICU benchmark in string prepping

Sunday, June 21, 2009 - 02:57 PM

Due to Waqas's asking for months now I've finally got around and made some benchmarks on two string prepping libraries. The one being libidn, as far as I know most XMPP servers use this and the other being ICU by IBM.

libidn is LGPL licensed and ICU is MIT licensed.

Current XMPP standard says that every JID must be string prepped so if you don't want to cache because of memory reasons your string prepping routines are called quite often. It turns out ICU is much faster than libidn. For this benchmark I tested a couple of strings and let them go through nameprep, resourceprep and nodeprep profiles via string prepping.

The result is that ICU is about 60 times faster in string prepping. Version of libidn being 1.15 and of ICU being 4.2.0.1.

The source code package of the benchmark is attached to this node. It falls under GPLv3 license.

AttachmentSize
stringprep_bench.tar_.bz213.24 KB
Comment! Keep reading >>

As far as I know, LibIDN has

Submitted by Remko Tronçon (not verified) on Mon, 06/22/2009 - 06:55.

As far as I know, LibIDN has always been LGPL, not GPL (http://www.gnu.org/software/libidn/)

Yeah, sorry I misread

Submitted by Tobias Markmann on Mon, 06/22/2009 - 08:40.

Yeah, sorry I misread something on that site. Only the tools that come with libidn are GPL. I fixed it in the article. Thanks.