Skip to content

Instantly share code, notes, and snippets.

View superdump's full-sized avatar

Robert Swain superdump

View GitHub Profile
diff --git a/Cargo.toml b/Cargo.toml
index c4ae846..587cc45 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,6 +15,7 @@ exclude = [
"benches/*",
"test.jpg"
]
+build = "build.rs"
@superdump
superdump / README.md
Last active July 1, 2019 11:41
Compare hashes of files in two identical directory structures to check data integrity and copy from src to dst if hashes mismatch

My laptop was crashing repeatedly and I needed to back up the data. I had done an rsync from a couple of important directories on the laptop hard drive to an external drive:

rsync \
	--archive \
	--compress \
	--progress \
	--append-verify \
	--partial \
	--inplace \
fn partition_points(vertices: &Vec<Vertex2>, e: &Edge, s_opt: Option<&Vec<(usize, f32)>>) -> (Vec<(usize, f32)>, Vec<(usize, f32)>) {
let mut s_right = Vec::<(usize, f32)>::new();
let mut s_left = Vec::<(usize, f32)>::new();
// i did this...
let closure = |i: &usize| {
if *i == e.origin || *i == e.destination {
return;
}
// shapes.rs
use bevy::{
prelude::*,
render::{
mesh::{Mesh, VertexAttribute},
pipeline::PrimitiveTopology,
},
};
Running /Users/roberts/projects/rust/building-blocks/target/release/deps/greedy_quads-fa08d55d6e2b023d
Gnuplot not found, using plotters backend
greedy_quads_terrace/8 time: [10.510 us 10.582 us 10.658 us]
change: [-31.969% -31.222% -30.500%] (p = 0.00 < 0.05)
Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
4 (4.00%) high mild
1 (1.00%) high severe
greedy_quads_terrace/16 time: [67.265 us 68.004 us 68.839 us]
change: [-39.006% -37.956% -36.982%] (p = 0.00 < 0.05)
@superdump
superdump / bevy_render_v2.5.md
Last active September 29, 2023 15:12
Bevy Render v2.5

Design Goals

  • Avoid lookups in hot paths I.e. per-entity
    • 'Random' lookups cause cache misses whereas linear scans are much more cache coherent and so often perform much better

How things work on main at a5a457c3c82cc2e501bf6e85a2e2d07b5b7838a9

  • extract_meshes:
    • iterates an ECS query (good)
  • filters out non-visible entities based on the ViewVisibility component (good)