<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Code compiled by SEGGER is faster than one compiled with just GCC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81852/code-compiled-by-segger-is-faster-than-one-compiled-with-just-gcc</link><description>Hi, 
 (nRF52840) 
 I have project made in SEGGER Embedded Studio with OPUS Encoder (optimized by Nordic). It&amp;#39;s CELT, bitrate 40000 and complexity 5. This is configuration of the optimization and debug: 
 
 On project made in SEGGER, this configuration</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Nov 2021 08:40:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81852/code-compiled-by-segger-is-faster-than-one-compiled-with-just-gcc" /><item><title>RE: Code compiled by SEGGER is faster than one compiled with just GCC</title><link>https://devzone.nordicsemi.com/thread/339762?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 08:40:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00a61e2f-bf2c-4472-a243-df0ece40c9c7</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Dear Marek,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know how much of a difference you can expect between these libraries, but this was the only explanation I could think of.&lt;/p&gt;
&lt;p&gt;My idea was that you could try the size optimized version of the Segger library (i.e. set the library optmization to &amp;quot;small&amp;quot;) to see if it would impact the performance, not that you should try to link in nanolib in the SES project. Another thing you can try is to use newlib in your makefile project by commenting this line in your Makefile:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# use newlib in nano version
#LDFLAGS += --specs=nano.specs&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code compiled by SEGGER is faster than one compiled with just GCC</title><link>https://devzone.nordicsemi.com/thread/339732?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 05:25:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:125932bf-c9bc-4efb-9ef9-4dd0a7892cbe</guid><dc:creator>Despair1337 </dc:creator><description>&lt;p&gt;Dear Vidar,&lt;br /&gt;Thank you for fast reply.&lt;br /&gt;By default, it has been configured as &amp;quot;Embedded Studio&amp;quot;, and there is only &amp;quot;SEGGER&amp;quot; option, not possible to specify custom runtime lib as nanolib.&lt;/p&gt;
&lt;p&gt;Do you think this can be that big difference? Only differences I think it could have is that Segger&amp;#39;s runtime library have optimized memcpy and memset function (and few other subset of functions which are used by OPUS), which would make encoding faster, but that more faster it can handle complexity 5? Any other ideas where should be an issue? Please note, that our makefile project is based on blinky makefile, I&amp;#39;m not sure on how much the MCU is initialized in this blinky project.&lt;/p&gt;
&lt;p&gt;Thank you for your time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code compiled by SEGGER is faster than one compiled with just GCC</title><link>https://devzone.nordicsemi.com/thread/339654?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2021 13:17:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d6ccfd1-2600-4f86-b03e-7fbde050b34a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello Marek,&lt;/p&gt;
&lt;p&gt;They both use GCC for compiling and linking, but Segger provides their own runtime libraries: &lt;a href="https://www.segger.com/products/development-tools/runtime-library/"&gt;https://www.segger.com/products/development-tools/runtime-library/&lt;/a&gt;. Could that be the reason maybe? You may try to change the library settings in Segger to see if it impacts the performance for your test:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1637241388718v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>