# CM3 speed improvement proposal

**URL:** <https://forums.freertos.org/t/cm3-speed-improvement-proposal/3317>\
**Category:** Kernel\
**Created:** [March 7, 2010, 8:19pm UTC](https://forums.freertos.org/t/cm3-speed-improvement-proposal/3317 "2010-03-07T20:19:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 7, 2010, 8:19pm UTC](https://forums.freertos.org/t/cm3-speed-improvement-proposal/3317/1 "2010-03-07T20:19:30Z")

</div>

**[artlip](https://sourceforge.net/u/artlip/)** wrote on [Sunday, March 07, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/916c4099/#a897):

Hello,

I want to propose improvements for a task switching and for a critical section code.

The base concept is to change portYIELD, portENTER\_CRITICAL and portEXIT\_CRITICAL into macros which allows compiler to put it as inlined code. To achieve a full potential of the (critical section) inlined code there is also required a small change in the interrupt masking code. A compiler should be allowed to “freely” choose register used for storing constant (mask value). BTW\> this improvement part is the same like the improvement request (2709048) from Samuel Tardieu.  
The downside of this solution is the increase of the OS code (in case of tests described below it is 376 bytes). The exact size of increase depends on how many FreeRTOS functions (with critical sections) is used and does not depend on the number of API calls used in the application.

I made two tests to check if this code fix will give a real speedup gain. Tests was performed using original FreeRTOS 6.0.3, GCC 4.4.3, compiler optimization -Os, STM32F103 @ 72MHz.

1. The first test was about speed of queue operations. There was configured 2 tasks with the same priority, queue with 1024 entries of 4 bytes long (system tick period at 1ms).  
The first task puts into queue as many entries as possible. When queue is full task executes delay for one tick.  
The second task receives from queue as many entries as possible. When queue is empty task executes delay for one tick.  
There was measured number of successfull xQueueSend and xQueueReceive operations during test period (20s).

2. The second test was about speed of a context switching. There was configured 2 tasks with the same priority, two binary semaphores - one of them intially acquired (system tick period at 1ms).  
The first task acquires semaphore number 1 then releases semaphore number 2. The second task acquires semaphore number 2 then releases semaphore number 1.  
There was measured number of task loops during test period (20s).

Results:  
Test 1 - 5.8% improvement  
Test 2 - 15.9% improvement

The first (and obvious) cause of this speedup is elimination of function calls and the second cause comes from the fact that Flash prefetch buffer is not disturbed.

The patches for portmacro.h and port.c:

– portmacro.h.orig&nbsp;&nbsp;&nbsp; 2010-02-19 14:23:46.000000000 +0100  
+++ portmacro.h 2010-03-07 20:33:22.057137332 +0100  
@@ -93,53 +93,63 @@  
#define portBYTE\_ALIGNMENT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8  
/\*---------------------------------------\*/

+#define portNVIC\_INT\_CTRL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( ( volatile unsigned long \*) 0xe000ed04 )  
+#define portNVIC\_PENDSVSET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x10000000

/\* Scheduler utilities. \*/  
-extern void vPortYieldFromISR( void );  
+#define vPortYieldFromISR()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \  
+&nbsp;&nbsp; do { /\* Set a PendSV to request a context switch. \*/&nbsp;&nbsp;&nbsp; \  
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \*(portNVIC\_INT\_CTRL) = portNVIC\_PENDSVSET;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \  
+&nbsp;&nbsp; } while (0)

#define portYIELD()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vPortYieldFromISR()

-#define portEND\_SWITCHING\_ISR( xSwitchRequired ) if( xSwitchRequired ) vPortYieldFromISR()  
/\*---------------------------------------\*/

/\* Critical section management. \*/

## +/\* + \* Set basepri to requested value. Lets compiler to choose clobbered register. + \*/ +static inline void portSetBasePri(uint32\_t value) +{ +&nbsp;&nbsp; \_\_asm volatile (“msr basepri, %0” : : “r” (value) ); +} + /\* - \* Set basepri to portMAX\_SYSCALL\_INTERRUPT\_PRIORITY without effecting other - \* registers.&nbsp; r0 is clobbered. + \* Set basepri to portMAX\_SYSCALL\_INTERRUPT\_PRIORITY - disable RTOS interrupts. &nbsp; \*/ -#define portSET\_INTERRUPT\_MASK()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \ -&nbsp;&nbsp; \_\_asm volatile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \ -&nbsp;&nbsp; (&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \ -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&nbsp;&nbsp; mov r0, %0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \n" \ -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&nbsp;&nbsp; msr basepri, r0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \n" \ -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ::“i”(configMAX\_SYSCALL\_INTERRUPT\_PRIORITY):“r0”&nbsp;&nbsp;&nbsp; \ -&nbsp;&nbsp; )

+#define portSET\_INTERRUPT\_MASK()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; portSetBasePri(configMAX\_SYSCALL\_INTERRUPT\_PRIORITY)  
+  
/\*  
- \* Set basepri back to 0 without effective other registers.  
- \* r0 is clobbered.  
+ \* Set basepri back to 0 - enable RTOS interrupts.  
&nbsp; \*/  
-#define portCLEAR\_INTERRUPT\_MASK()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \  
-&nbsp;&nbsp; \_\_asm volatile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \  
-&nbsp;&nbsp; (&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \  
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&nbsp;&nbsp; mov r0, #0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \n" \  
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&nbsp;&nbsp; msr basepri, r0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \n" \  
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :::“r0”&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \  
-&nbsp;&nbsp; )  
+#define portCLEAR\_INTERRUPT\_MASK()&nbsp;&nbsp;&nbsp;&nbsp; portSetBasePri(0)

#define portSET\_INTERRUPT\_MASK\_FROM\_ISR()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0;portSET\_INTERRUPT\_MASK()  
-#define portCLEAR\_INTERRUPT\_MASK\_FROM\_ISR(x)&nbsp;&nbsp; portCLEAR\_INTERRUPT\_MASK();(void)x  
+#define portCLEAR\_INTERRUPT\_MASK\_FROM\_ISR(x)&nbsp;&nbsp; portCLEAR\_INTERRUPT\_MASK()  
+  
+extern volatile unsigned portBASE\_TYPE uxCriticalNesting;

+#define portDISABLE\_INTERRUPTS()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; portSET\_INTERRUPT\_MASK()  
+#define portENABLE\_INTERRUPTS()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; portCLEAR\_INTERRUPT\_MASK()

-extern void vPortEnterCritical( void );  
-extern void vPortExitCritical( void );  
+#define portENTER\_CRITICAL()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \  
+&nbsp;&nbsp; do {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \  
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; portDISABLE\_INTERRUPTS();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \  
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uxCriticalNesting++;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \  
+&nbsp;&nbsp; } while (0)  
+  
+#define portEXIT\_CRITICAL()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \  
+&nbsp;&nbsp; do {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \  
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uxCriticalNesting-;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \  
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if( uxCriticalNesting == 0 )&nbsp;&nbsp;&nbsp; \  
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \  
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; portENABLE\_INTERRUPTS();&nbsp;&nbsp;&nbsp; \  
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \  
+&nbsp;&nbsp; } while (0)

-#define portDISABLE\_INTERRUPTS()&nbsp;&nbsp; portSET\_INTERRUPT\_MASK()  
-#define portENABLE\_INTERRUPTS()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; portCLEAR\_INTERRUPT\_MASK()  
-#define portENTER\_CRITICAL()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vPortEnterCritical()  
-#define portEXIT\_CRITICAL()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vPortExitCritical()  
/\*---------------------------------------\*/

/\* Task function macros as described on the [FreeRTOS.org](http://FreeRTOS.org) WEB site. \*/

– port.c.orig 2010-02-19 14:23:46.000000000 +0100  
+++ port.c&nbsp; 2010-03-07 20:23:23.197147006 +0100  
@@ -69,12 +69,10 @@  
/\* Constants required to manipulate the NVIC. \*/  
#define portNVIC\_SYSTICK\_CTRL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( ( volatile unsigned long \*) 0xe000e010 )  
#define portNVIC\_SYSTICK\_LOAD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( ( volatile unsigned long \*) 0xe000e014 )  
-#define portNVIC\_INT\_CTRL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( ( volatile unsigned long \*) 0xe000ed04 )  
#define portNVIC\_SYSPRI2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( ( volatile unsigned long \*) 0xe000ed20 )  
#define portNVIC\_SYSTICK\_CLK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x00000004  
#define portNVIC\_SYSTICK\_INT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x00000002  
#define portNVIC\_SYSTICK\_ENABLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x00000001  
-#define portNVIC\_PENDSVSET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x10000000  
#define portNVIC\_PENDSV\_PRI&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( ( ( unsigned long ) configKERNEL\_INTERRUPT\_PRIORITY ) \<\< 16 )  
#define portNVIC\_SYSTICK\_PRI&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( ( ( unsigned long ) configKERNEL\_INTERRUPT\_PRIORITY ) \<\< 24 )

@@ -87,7 +85,7 @@

/\* Each task maintains its own interrupt status in the critical nesting  
variable. \*/  
-static unsigned portBASE\_TYPE uxCriticalNesting = 0xaaaaaaaa;  
+volatile unsigned portBASE\_TYPE uxCriticalNesting = 0xaaaaaaaa;

/\*  
&nbsp; \* Setup the timer to generate the tick interrupts.  
@@ -191,30 +189,6 @@  
}  
/\*---------------------------------------\*/

## -void vPortYieldFromISR( void ) -{ -&nbsp;&nbsp; /\* Set a PendSV to request a context switch. \*/ -&nbsp;&nbsp; \*(portNVIC\_INT\_CTRL) = portNVIC\_PENDSVSET; -} -/\*---------------------------------------\*/

## -void vPortEnterCritical( void ) -{ -&nbsp;&nbsp; portDISABLE\_INTERRUPTS(); -&nbsp;&nbsp; uxCriticalNesting++; -} -/\*---------------------------------------\*/

## -void vPortExitCritical( void ) -{ -&nbsp;&nbsp; uxCriticalNesting-; -&nbsp;&nbsp; if( uxCriticalNesting == 0 ) -&nbsp;&nbsp; { -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; portENABLE\_INTERRUPTS(); -&nbsp;&nbsp; } -} -/\*---------------------------------------\*/

void xPortPendSVHandler( void )  
{  
&nbsp;&nbsp;&nbsp; /\* This is a naked function. \*/

## Regards,

Artur Lipowski

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 7, 2010, 10:05pm UTC](https://forums.freertos.org/t/cm3-speed-improvement-proposal/3317/2 "2010-03-07T22:05:42Z")

</div>

**[edwards3](https://sourceforge.net/u/edwards3/)** wrote on [Sunday, March 07, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/916c4099/#61e0):

It would be good to include an option to either inline or not inline, maybe that could be part of FreeRTOSConfig.h? But I don’t think inline is actually part of the official C language until C99.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 8, 2010, 8:18am UTC](https://forums.freertos.org/t/cm3-speed-improvement-proposal/3317/3 "2010-03-08T08:18:30Z")

</div>

**[artlip](https://sourceforge.net/u/artlip/)** wrote on [Monday, March 08, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/916c4099/#f5da):

Are you asking for making configurable the “static inline void portSetBasePri”?  
I don’t know the official policy for C standard used in the FreeRTOS. I’d rather assume that CM3 is so new CPU that any compiler for it should support inline without problems. Of course my assumption can be wrong and in such case there can be used a plain \_\_asm instead (with fix from Samuel Tardieu) and no configuration is necessary in such case.

Of course offering more choices is a good idea, but I MHO making the whole fix configurable is a little better idea. This will allow to make choice between code size and speed.

Regards,

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [March 8, 2010, 1:08pm UTC](https://forums.freertos.org/t/cm3-speed-improvement-proposal/3317/4 "2010-03-08T13:08:23Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Monday, March 08, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/916c4099/#23da):

These code size Vs execution speed trade offs are always a matter of opinion and circumstance.&nbsp; I agree making it configurable would be the best thing, although compilers will often inline short functions in any case once the optimiser is switched on.

With regards to the use of the inline keyword - I don’t have a problem with it as long as it is only in the portable layer, so will only get compiled with a single compiler that can be tested.&nbsp; Older versions of FreeRTOS had an inline used in tasks.h that caused no end of problems on the low end compilers.

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 9, 2010, 7:00pm UTC](https://forums.freertos.org/t/cm3-speed-improvement-proposal/3317/5 "2010-03-09T19:00:39Z")

</div>

**[artlip](https://sourceforge.net/u/artlip/)** wrote on [Tuesday, March 09, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/916c4099/#fa93):

There is created the new feature request [https://sourceforge.net/tracker/?func=detail&aid=2966871&group\_id=111543&atid=659636](https://sourceforge.net/tracker/?func=detail&aid=2966871&group_id=111543&atid=659636) 2966871 with patches discussed in this thread.  
Patches are modified to make inlining optional through configCM3\_PORT\_USE\_INLINE macro.

Regards,
