Messages in this thread | | | Date | Thu, 28 Oct 1999 22:28:54 +0200 (CEST) | From | (Arjan van de Ven) | Subject | Re: [PATCH] strlen |
| |
> Here is an optimized strlen function for i586+ processors, it works by > testing 4 bytes at a time and averages 1.8 clock cycles per byte (scas = > 4n).
This, I think, is a problem on i386. You _cannot_ read beyond the end of the string (might be on an other, unmapped page), but you don't know that until you do, when doing 4 bytes at a time. I mean: You can only know that you went to far...
ia64 DOES allow this by doing the memload conditional and allowing soft/local pagefaults to end the loop. Ask the Trilian guys about this if you want to know more...
Greetings, Arjan van de Ven
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |