raiden00pl commented on PR #19555:
URL: https://github.com/apache/nuttx/pull/19555#issuecomment-5622833685

   the thing is this is not precisely defined in the standard (or I can't find 
it). 
   
   Most of global data looks like this:
   
   ```
   static const uintptr_t stm32_pfccr_layer_t[DMA2D_NLAYERS] =
   {
     STM32_DMA2D_FGPFCCR,
     STM32_DMA2D_BGPFCCR,
     STM32_DMA2D_OPFCCR
   };
   
   ```
   
   most of local data looks like this:
   
   ```
     static const int modeflags[] =
     {
       O_RDONLY | O_TEXT,
       O_RDONLY,
       O_RDWR | O_TEXT,
       O_RDWR,
       O_WRONLY | O_CREAT | O_TRUNC | O_TEXT,
       O_WRONLY | O_CREAT | O_TRUNC,
       O_RDWR | O_CREAT | O_TRUNC | O_TEXT,
       O_RDWR | O_CREAT | O_TRUNC,
       O_WRONLY | O_CREAT | O_APPEND | O_TEXT,
       O_WRONLY | O_CREAT | O_APPEND,
       O_RDWR | O_CREAT | O_APPEND | O_TEXT,
       O_RDWR | O_CREAT | O_APPEND,
     };
   
   ```
   
   These are stats:
   
   ```
   Global:                                                                      
                                                                                
                                                                                
                                  
     - aligned: 9039                                                            
                                                                                
                                                                                
                                    
     - indented: 65                                                             
                                                                                
                                                                                
                                    
                                                                                
                                                                                
                                                                                
                                    
     Local (in function):                                                       
                                                                                
                                                                                
                                    
     - aligned: 354                                                             
                                                                                
                                                                                
                                    
     - indented: 295  
   
   ```
   
   so aligned version (the second one) is more popular. For local data this is 
small difference, but if we want align this with global data, aligned version 
is huge win.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to