[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Steal all string functions from the libc
From: |
Samuel Thibault |
Subject: |
Re: [PATCH] Steal all string functions from the libc |
Date: |
Fri, 28 Mar 2014 16:33:39 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Fri 28 Mar 2014 16:22:14 +0100, a écrit :
> Steal all string functions previously implemented in kern/strings.c
> from the libc. Those are most likely more optimized than our simple
> implementations.
Well, we used to do that in the past, actually, and ended up into
various kinds of issues. For instance, one can't really use SSE inside
the kernel, and the likes. Such kinds of very simple operations
already get optimized easily by the compiler or even the processor
itself (see a disassemble of memcpy, it ends up being a rep movsb
%ds:(%esi),%es:(%edi), which is just exactly what we need to tell
the processor). I don't think the maintenance burden is worth the
performance gain.
Samuel