strcspn(3) complexity improvement
From: Jeremie Le Hen (jeremie_at_le-hen.org)
Date: 03/30/05
- Previous message: Dan Cojocar: "Re: Interrupt storm"
- Next in thread: Peter Jeremy: "Re: strcspn(3) complexity improvement"
- Reply: Peter Jeremy: "Re: strcspn(3) complexity improvement"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 30 Mar 2005 10:34:35 +0200 To: freebsd-current@FreeBSD.org
Hi list,
Andreas Hauser made a patch to strcspn(3) for the DragonFly project
which makes it faster when dealing with long strings [1] (rev 1.4).
It basically changes the complexity of the function from
O(strlen(str) * strlen(chars))
to
O(strlen(str) + strlen(chars))
by using a charset.
I have two questions. First, is this change worth enough to be merged
in FreeBSD (this function is currently used in 42 binaries from
/{,usr/}{s,}bin) ? I mean does the performance gain on large strings
compensates the use of a large 256-bytes buffer ?
Second, I would like to know how to deal with the copyright update.
ATM, I changed the top of the copyright (up to Andrea's email address),
is it acceptable ?
The temporary patch is here [2], I didn't have time to try it yet, this
is why it is not attached with this email.
Best regards,
[1] http://www.dragonflybsd.org/cvsweb/src/lib/libc/string/strcspn.c
[2] http://jeremie.le-hen.org/~tataz/patches/FreeBSD/libc.strcspn.dfbsd.patch
-- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
- Previous message: Dan Cojocar: "Re: Interrupt storm"
- Next in thread: Peter Jeremy: "Re: strcspn(3) complexity improvement"
- Reply: Peter Jeremy: "Re: strcspn(3) complexity improvement"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|