Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
New software: xstr - Thread-safe string functions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-07-08 (02:00)
From: Gerd Stolpmann <Gerd.Stolpmann@d...>
Subject: New software: xstr - Thread-safe string functions
>From the README:

	This package implements frequent string operations: searching, replacing,
	splitting, matching. It is independent from the Str library, and can 
	replace Str in many cases. Unlike Str, xstr is thread-safe. xstr does
	not implement regular expressions in general, but an important subset.
	Some operations of xstr are performed as quickly as by Str; if the string
	to be processed is small, xstr is often faster than Str; if the string is
	big, xstr is upto half as fast as Str. 

You can download the package from the usual place:

This package has an entry in the O'Caml link database; updates are announced

Note: that xstr is often slower than Str (which bases on the GNU regex library)
is partly caused by the missing bitstrings. As substitute I use an array of
16 integers storing 16 bits each. The membership-test for bitstrings is the
most frequent operation, and it must be fast to get good results. What I would
need is a primitive that finds the next character in a string that is member of
a given bitstring. Most time-consuming loops in xstr do exactly this.

Gerd Stolpmann      Telefon: +49 6151 997705 (privat)
Viktoriastr. 100             
64293 Darmstadt     EMail: (privat)