g2gps opened a new pull request, #10358:
URL: https://github.com/apache/nuttx/pull/10358

   ## Summary
   
   This change improves the performance when using larger 
CONFIG_STDIO_BUFFER_SIZE values as it allows architecture specific, or 
optimized memcpy algorithms to be utilized.
   
   ## Impact
   
   Improved fread performance when using larger CONFIG_STDIO_BUFFER_SIZE. 
   
   Using our platform, based on the arty-a7, and a stdio buffer of 4096:
   
   Before this change:
   ```
   Operation              Variant          Size         Mean         Max        
  Min          Throughput(s)    Repetitions  Handles      Status
   file_write             sequential       1.00B        361.16us     1.18ms     
  352.02us     2.70KB           100          1            0
   file_read              sequential       1.00B        448.54us     8.97ms     
  358.58us     2.18KB           100          1            0
   file_write             sequential       64.00B       374.41us     1.77ms     
  358.52us     166.93KB         100          1            0
   file_read              sequential       64.00B       501.63us     9.02ms     
  407.98us     124.59KB         100          1            0
   file_write             sequential       512.00B      1.13ms       24.45ms    
  373.62us     442.94KB         100          1            0
   file_read              sequential       512.00B      1.32ms       17.50ms    
  759.34us     379.96KB         100          1            0
   file_write             sequential       4.00KB       6.89ms       32.57ms    
  701.91us     580.49KB         32           1            0
   file_read              sequential       4.00KB       6.84ms       20.34ms    
  4.00ms       584.47KB         32           1            0
   ```
   
   With this change:
   ```
   Operation              Variant          Size         Mean         Max        
  Min          Throughput(s)    Repetitions  Handles      Status
   file_write             sequential       1.00B        353.59us     430.28us   
  352.02us     2.76KB           100          1            0
   file_read              sequential       1.00B        455.58us     8.99ms     
  367.40us     2.14KB           100          1            0
   file_write             sequential       64.00B       373.31us     1.67ms     
  358.52us     167.42KB         100          1            0
   file_read              sequential       64.00B       464.97us     8.99ms     
  372.56us     134.42KB         100          1            0
   file_write             sequential       512.00B      1.12ms       24.47ms    
  373.62us     447.83KB         100          1            0
   file_read              sequential       512.00B      939.14us     17.13ms    
  390.22us     532.40KB         100          1            0
   file_write             sequential       4.00KB       6.89ms       31.25ms    
  701.91us     580.52KB         32           1            0
   file_read              sequential       4.00KB       3.75ms       17.27ms    
  920.49us     1.04MB           32           1            0
   ```
   
   ## Testing
   
   - sim:ostest. Exits with status 0.
   - sim:nsh with `CONFIG_TESTING_SMART_TEST` enabled
   
   ```
   nsh> smart_test -c 2000 /tmp/test
   Creating file /tmp/test for write mode
   Writing test data.  128 lines to write
   127
   Done.
   
   Append test failed
   Performing 128 random seek with write tests
   127
   Pass
   Creating circular log with 40000 records
   Performing 2000 circular log record update tests
   1999
   Pass
   ```
   
   Note: The append test fails before and after this commit. I don't believe 
it's related to this change. 
   
   


-- 
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