Merge pull request #54 from Magnus167/fix-benchmark

Update benchmarks and fix README formatting
This commit is contained in:
Palash Tyagi 2025-07-06 01:00:48 +01:00 committed by GitHub
commit f44bb5b205
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,6 @@
# rustframe
# <img align="center" alt="Rustframe" src=".github/rustframe_logo.png" height="50px" /> rustframe
<!-- # <img align="center" alt="Rustframe" src=".github/rustframe_logo.png" height="50px" /> rustframe -->
<!-- though the centre tag doesn't work as it would noramlly, it achieves the desired effect -->

View File

@ -4,7 +4,7 @@ use criterion::{criterion_group, criterion_main, Criterion};
use rustframe::{
frame::{Frame, RowIndex},
matrix::{BoolMatrix, Matrix, SeriesOps},
matrix::{Axis, BoolMatrix, Matrix, SeriesOps},
utils::{DateFreq, DatesList},
};
use std::time::Duration;
@ -142,7 +142,7 @@ fn matrix_operations_benchmark(c: &mut Criterion, sizes: &[usize]) {
});
c.bench_function(&format!("matrix apply_axis ({}x{})", size, size), |b| {
b.iter(|| {
let _result = ma.apply_axis(0, |col| col.iter().sum::<f64>());
let _result = ma.apply_axis(Axis::Col, |col| col.iter().sum::<f64>());
});
});
c.bench_function(&format!("matrix transpose ({}x{})", size, size), |b| {
@ -256,7 +256,7 @@ fn benchmark_frame_operations(c: &mut Criterion, sizes: &[usize]) {
});
c.bench_function(&format!("frame apply_axis ({}x{})", size, size), |b| {
b.iter(|| {
let _result = fa.apply_axis(0, |col| col.iter().sum::<f64>());
let _result = fa.apply_axis(Axis::Col, |col| col.iter().sum::<f64>());
});
});
c.bench_function(&format!("frame transpose ({}x{})", size, size), |b| {