Mercurial > projects > ldc
diff runtime/internal/arrayInit.d @ 1480:b3ba2c6ff038
Use `llvm.memset` instead of `_d_array_init_i1` and `_d_array_init_i8`.
This exposes what's happening to LLVM, and memset is probably faster than the
runtime functions we were using anyway.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 07 Jun 2009 13:57:59 +0200 |
parents | c78fd2d30da1 |
children |
line wrap: on
line diff
--- a/runtime/internal/arrayInit.d Sat Jun 06 20:16:13 2009 +0200 +++ b/runtime/internal/arrayInit.d Sun Jun 07 13:57:59 2009 +0200 @@ -12,22 +12,6 @@ // per-element array init routines -void _d_array_init_i1(bool* a, size_t n, bool v) -{ - auto p = a; - auto end = a+n; - while (p !is end) - *p++ = v; -} - -void _d_array_init_i8(ubyte* a, size_t n, ubyte v) -{ - auto p = a; - auto end = a+n; - while (p !is end) - *p++ = v; -} - void _d_array_init_i16(ushort* a, size_t n, ushort v) { auto p = a;