mirror of
https://github.com/Magnus167/rustframe.git
synced 2025-08-21 07:20:01 +00:00
Compare commits
4 Commits
dfe259a371
...
9702b6d5c4
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9702b6d5c4 | ||
![]() |
6a9b828ada | ||
![]() |
1a5b8919d3 | ||
![]() |
2e980a78fa |
3
.github/scripts/custom_benchmark_report.py
vendored
3
.github/scripts/custom_benchmark_report.py
vendored
@ -247,7 +247,8 @@ def generate_html_table_with_links(
|
|||||||
{html_doc_end}"""
|
{html_doc_end}"""
|
||||||
|
|
||||||
all_sizes = sorted(
|
all_sizes = sorted(
|
||||||
list(set(size for test_data in results.values() for size in test_data.keys()))
|
list(set(size for test_data in results.values() for size in test_data.keys())),
|
||||||
|
key=(lambda x: int(x.split("x")[0])),
|
||||||
)
|
)
|
||||||
all_test_names = sorted(list(results.keys()))
|
all_test_names = sorted(list(results.keys()))
|
||||||
|
|
||||||
|
10
.github/workflows/run-benchmarks.yml
vendored
10
.github/workflows/run-benchmarks.yml
vendored
@ -36,6 +36,16 @@ jobs:
|
|||||||
- name: Run benchmarks
|
- name: Run benchmarks
|
||||||
run: cargo bench --features bench
|
run: cargo bench --features bench
|
||||||
|
|
||||||
|
- name: Generate custom benchmark reports
|
||||||
|
run: |
|
||||||
|
if [ -d ./target/criterion ]; then
|
||||||
|
echo "Found benchmark reports, generating custom report..."
|
||||||
|
else
|
||||||
|
echo "No benchmark reports found, skipping custom report generation."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
python .github/scripts/custom_benchmark_report.py
|
||||||
|
|
||||||
- name: Upload benchmark reports
|
- name: Upload benchmark reports
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
@ -236,8 +236,8 @@ fn run_benchmarks_large(c: &mut Criterion) {
|
|||||||
fn config_small_arrays() -> Criterion {
|
fn config_small_arrays() -> Criterion {
|
||||||
Criterion::default()
|
Criterion::default()
|
||||||
.sample_size(500)
|
.sample_size(500)
|
||||||
.measurement_time(Duration::from_millis(500))
|
.measurement_time(Duration::from_millis(100))
|
||||||
.warm_up_time(Duration::from_millis(50))
|
.warm_up_time(Duration::from_millis(5))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn config_medium_arrays() -> Criterion {
|
fn config_medium_arrays() -> Criterion {
|
||||||
@ -254,6 +254,7 @@ fn config_large_arrays() -> Criterion {
|
|||||||
.warm_up_time(Duration::from_millis(200))
|
.warm_up_time(Duration::from_millis(200))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
criterion_group!(
|
criterion_group!(
|
||||||
name = benches_small_arrays;
|
name = benches_small_arrays;
|
||||||
config = config_small_arrays();
|
config = config_small_arrays();
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
use std::ops::{Add, BitAnd, BitOr, BitXor, Div, Index, IndexMut, Mul, Not, Sub};
|
use std::ops::{Add, BitAnd, BitOr, BitXor, Div, Index, IndexMut, Mul, Not, Sub};
|
||||||
|
|
||||||
/// A column‑major 2D matrix of `T`
|
/// A column‑major 2D matrix of `T`. Index as `Array(row, column)`.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
pub struct Matrix<T> {
|
pub struct Matrix<T> {
|
||||||
rows: usize,
|
rows: usize,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user