Nils Goroll <sl...@schokola.de> wrote: > Ref: http://defect.opensolaris.org/bz/show_bug.cgi?id=11552 > > Hi, > > today I noticed this inefficient implementation for the "find first set bit" > function: > > http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/common/util/ffs.c
This looks extremely inefficient. > efficient implementations already exist under the name of lowbit, e.g. in: > > usr/src/uts/sparc/os/bitmap_arch.c > usr/src/uts/intel/ia32/ml/i86_subr.s There is a BSD include file called bitstring.h I made a portable version from it and you can find it in the star implementation. ftp://ftp.berlios.de/pub/star/ Jörg -- EMail:jo...@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin j...@cs.tu-berlin.de (uni) joerg.schill...@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code