Re: Re: [MLton-commit] r7458
"Wesley W. Terpstra" <[email protected]>
| Newsgroups | gmane.comp.lang.ml.mlton.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, May 10, 2010 at 8:19 PM, Matthew Fluet <[email protected]>wrote: > > I really want to hurt whoever decided to take this idiom away. There are > no > > alternatives except calling out to memcpy (or similar) via a char*. The > cost > > to performance for a simple endian-swap is absurd. > Looking at the assembly code using memcpy vs. using a union with > __attribute__((__may_alias__)), they are nearly identical at all but > -O0. Certainly, no explicit memcpy calls, and sometimes the code that > had memcpy is compiled to a shorter assembly sequence. > So gcc optimizes the memcpy away? Interesting/Impressive. _______________________________________________ MLton mailing list [email protected] http://mlton.org/mailman/listinfo/mlton