lkml.org 
[lkml]   [2020]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 0/4] -ffreestanding/-fno-builtin-* patches
Date
From: Arvind Sankar
> Sent: 18 August 2020 23:26
...
> gcc-10 optimizes the generic memset implementation in there into a call
> to memset. Now that's on x86 which doesn't use the generic
> implementation, but this is just waiting to bite us.
>
> https://godbolt.org/z/6EhG15

Gah, if I want a call to memset() I'll write a call to memset().
If I'm trying to zero a small number of bytes I'll write a loop
because it'll be faster.

I wish compilers wouldn't even consider these sorts of 'optimisations'.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
\
 
 \ /
  Last update: 2020-08-19 10:27    [W:0.392 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site