ThePassionate opened a new pull request, #3343:
URL: https://github.com/apache/nuttx-apps/pull/3343

   ## Benchmarks: Add Whetstone FPU Benchmark with Enhanced Timing
   
   ### Summary
   
   This PR adds the Whetstone floating-point benchmark to NuttX applications. 
The Whetstone benchmark is a widely-used tool for evaluating FPU 
(floating-point unit) performance. The implementation includes timing 
enhancements that provide millisecond-level precision for more accurate 
performance measurement.
   
   ### Changes
   
   #### Files Added
   
   1. **benchmarks/whetstone/CMakeLists.txt**
      - CMake build configuration for Whetstone benchmark
   
   2. **benchmarks/whetstone/Kconfig**
      - Kconfig menu options for benchmark configuration
   
   3. **benchmarks/whetstone/Make.defs**
      - Make definitions for the benchmark module
   
   4. **benchmarks/whetstone/Makefile**
      - Makefile for standalone compilation
   
   5. **benchmarks/whetstone/whetstone.c**
      - Whetstone benchmark implementation ported and adapted for NuttX
   
   ### Technical Details
   
   **Whetstone Benchmark:**
   - Ported from the official netlib benchmark: 
https://www.netlib.org/benchmark/whetstone.c
   - Adapted to NuttX coding style and build system conventions
   - Comprehensive FPU performance evaluation tool
   
   **Timing Precision Enhancement:**
   - Original implementation used seconds-level timing (time(0))
   - Enhanced to use millisecond-level precision for better accuracy
   - Enables more precise measurement of short test cycles
   - Critical for accurate FPU performance evaluation on faster processors
   
   **Benefits:**
   - Millisecond precision allows measurement of test cycles completing in less 
than 1 second
   - Better accuracy on modern high-performance systems
   - Maintains compatibility with standard Whetstone benchmark methodology
   
   ### Impact
   
   - **Performance Evaluation**: Provides standard FPU benchmark for NuttX 
systems
   - **Measurement Accuracy**: Millisecond-level timing improves result 
precision
   - **Portability**: Maintains standard Whetstone benchmark characteristics
   - **Integration**: Seamlessly integrated into NuttX build system
   
   ### Usage
   
   Enable benchmark with:
   CONFIG_BENCHMARKS_WHETSTONE=y
   
   ### Testing
   
   Benchmark functionality verified on various systems with FPU support.
   
   `nsh> whetstone 100000
   Loops: 100000, Iterations: 1, Duration: 5 sec.`
   `C Converted Double Precision Whetstones: 2.00 MWIPS`
   
   ---
   
   **Author**: makejian <[email protected]>
   


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