From 8cb73f88d0726dd56d11bc62397d7ff0c4297a03 Mon Sep 17 00:00:00 2001 From: Aaron Fenyes Date: Mon, 19 Aug 2024 13:12:50 -0700 Subject: [PATCH] Rust native benchmark: drop unused dependencies Also, drop the commented-out beginnings of a `plotters-gtk4` version. I can't use `plotters-gtk4` on my machine because it requires GTK 4.14 or higher, and Ubuntu 22.04 is still at GTK 4.6. --- lang-trials/rust-benchmark-native/Cargo.toml | 2 -- lang-trials/rust-benchmark-native/src/main.rs | 6 ------ 2 files changed, 8 deletions(-) diff --git a/lang-trials/rust-benchmark-native/Cargo.toml b/lang-trials/rust-benchmark-native/Cargo.toml index 0ed8747..9cc878c 100644 --- a/lang-trials/rust-benchmark-native/Cargo.toml +++ b/lang-trials/rust-benchmark-native/Cargo.toml @@ -7,11 +7,9 @@ edition = "2021" [dependencies] cairo-rs = "0.20.1" gtk = { package = "gtk4", version = "0.9.0" } -##minifb = "0.27.0" nalgebra = "0.33.0" plotters = "0.3.6" plotters-cairo = "0.7.0" -##plotters-gtk4 = { git = "https://github.com/baarkerlounger/plotters-gtk4.git", branch = "patch-1" } [profile.release] opt-level = "s" # optimize for small code size diff --git a/lang-trials/rust-benchmark-native/src/main.rs b/lang-trials/rust-benchmark-native/src/main.rs index 1a3a787..f51389d 100644 --- a/lang-trials/rust-benchmark-native/src/main.rs +++ b/lang-trials/rust-benchmark-native/src/main.rs @@ -26,10 +26,8 @@ use gtk::{ DrawingArea, Label, Orientation, - /*Picture,*/ Scale }; -/*use plotters_gtk4::Paintable;*/ use std::time::Instant; mod engine; @@ -40,10 +38,6 @@ fn main() -> glib::ExitCode { .build(); app.connect_activate(|app| { - /* run time is typically 77 ms, but at one point i was consistently - getting more like 260 ms. it's not clear what was causing that. building - from scratch seemed to give the short run time, and waiting a while - since the last build might also have had some effect */ const TIME_RES: usize = 100; let start_time = Instant::now(); let eigval_series = engine::rand_eigval_series(60, TIME_RES);