| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Add optional comparison benchmarks that directly compare xtensor performance against raw C++ implementations. This helps users understand the performance characteristics and overhead of xtensor. Changes: - Add XTENSOR_BUILD_COMPARISON_BENCHMARKS CMake option (OFF by default) - Add benchmark/comparison/ directory with BLAS1 comparisons - add_vector: z = x + y (vector + vector) - add_scalar: z = x + a (vector + scalar) - mul_scalar: y = a * x (scalar * vector) - Each benchmark compares raw C++ vs xtensor (xarray, xtensor, noalias) Usage: cmake .. -DXTENSOR_BUILD_COMPARISON_BENCHMARKS=ON make benchmark_comparison ./comparison/benchmark_comparison 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Reduce code duplication and improve readability: - Add helper functions for xtensor/xarray creation - Add BENCHMARK_LOOP macro to reduce boilerplate - Add REGISTER_BENCHMARK macro for standard sizes - Rename: raw_cpp → std, shorten xtensor variants - Add size 8 to benchmark ranges - Use constexpr for scalar values Changes: - blas1_comparison.cpp: 211 → 197 lines (-14 lines) - Add min_size=8, max_size=16384, multiplier=4 constants - Simpler, more maintainable code 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
@sbstndb please merge https://github.com/xtensor-stack/xtensor/blob/master/benchmark/benchmark_stl.cpp into your approach! :) Thanks for your contributions! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is a Work in progress
Checklist
Description