Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.arch.embedded Subject: Re: [AVR] What assembler to use? Date: Mon, 18 Jun 2018 14:11:47 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 27 Message-ID: References: NNTP-Posting-Host: 67-130-15-94.dia.static.qwest.net X-Trace: reader1.panix.com 1529331107 26029 67.130.15.94 (18 Jun 2018 14:11:47 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Mon, 18 Jun 2018 14:11:47 +0000 (UTC) User-Agent: slrn/1.0.3 (Linux) Xref: csiph.com comp.arch.embedded:27841 On 2018-06-18, David Brown wrote: > But I would also recommend forgetting about gas - and forgetting about > writing code in assembly. You need a really god reason to be writing > anything more than tiny snippets in assembly these days. What he said. Many years ago, I did some profiling of an ARM7 project that was written in C using GCC 3.something. The application was spening a significant portion of its time in the BSD network stack's IP checksum function (which was written in standard C). No problem, thought I, as I wrote my own IP checksum function in ARM7 assembly. It was slower than the C function. After several solid days of work (including a hint from somebody about some pretty obscure ARM7 instruction features), I managed to come up with an IP checksum function that was noticably faster than the standard C one. A couple years later, there was a update to both the network stack and GCC. I re-ran the comparisons, and my carefully crafted assembly language was now slightly slower than the network stack's C version. -- Grant Edwards grant.b.edwards Yow! My mind is a potato at field ... gmail.com