mirror of
https://github.com/Magnus167/rustframe.git
synced 2025-08-20 04:00:01 +00:00
Merge pull request #54 from Magnus167/fix-benchmark
Update benchmarks and fix README formatting
This commit is contained in:
commit
f44bb5b205
@ -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 -->
|
<!-- though the centre tag doesn't work as it would noramlly, it achieves the desired effect -->
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ use criterion::{criterion_group, criterion_main, Criterion};
|
|||||||
|
|
||||||
use rustframe::{
|
use rustframe::{
|
||||||
frame::{Frame, RowIndex},
|
frame::{Frame, RowIndex},
|
||||||
matrix::{BoolMatrix, Matrix, SeriesOps},
|
matrix::{Axis, BoolMatrix, Matrix, SeriesOps},
|
||||||
utils::{DateFreq, DatesList},
|
utils::{DateFreq, DatesList},
|
||||||
};
|
};
|
||||||
use std::time::Duration;
|
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| {
|
c.bench_function(&format!("matrix apply_axis ({}x{})", size, size), |b| {
|
||||||
b.iter(|| {
|
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| {
|
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| {
|
c.bench_function(&format!("frame apply_axis ({}x{})", size, size), |b| {
|
||||||
b.iter(|| {
|
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| {
|
c.bench_function(&format!("frame transpose ({}x{})", size, size), |b| {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user