An alternative broken buggy Nix implementation in Rust + Java (for evaluation)

Overview

nixy

Development

Please use a stable Rust compiler for normal operation.

# https://kcachegrind.github.io/html/Home.html kcachegrind cachegrind.out.24077 # https://valgrind.org/docs/manual/cl-manual.html cargo +nightly build -Z build-std --target x86_64-unknown-linux-gnu --release cargo clean && RUSTFLAGS="-C target-cpu=native" cargo build --release valgrind --tool=callgrind --dump-instr=yes --collect-jumps=yes --simulate-cache=yes --branch-sim=yes ./target/release/nixy kcachegrind callgrind.out.53710 cargo clean && RUSTFLAGS="-C target-cpu=native" cargo build --release valgrind --tool=massif --stacks=yes ./target/release/nixy nix-shell -p massif-visualizer massif-visualizer massif.out.59811 valgrind --tool=dhat ./target/release/nixy https://github.com/flamegraph-rs/flamegraph nix-shell -p linuxPackages_latest.perf cargo install flamegraph cargo flamegraph">
nix-shell -p cargo

# for info from standard library follow
https://nnethercote.github.io/perf-book/profiling.html
# or maybe use the nix package?

# https://doc.rust-lang.org/rustc/profile-guided-optimization.html
rm -rf /tmp/pgo-data
RUSTFLAGS="-Cprofile-generate=/tmp/pgo-data" cargo build --release --target=x86_64-unknown-linux-gnu

# repeat
./target/x86_64-unknown-linux-gnu/release/nixy

rustup component add llvm-tools-preview

~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-profdata merge -o /tmp/pgo-data/merged.profdata /tmp/pgo-data

cargo build --release --target=x86_64-unknown-linux-gnu
time ./target/x86_64-unknown-linux-gnu/release/nixy

RUSTFLAGS="-Cprofile-use=/tmp/pgo-data/merged.profdata -Cllvm-args=-pgo-warn-missing-function" cargo build --release --target=x86_64-unknown-linux-gnu
time ./target/x86_64-unknown-linux-gnu/release/nixy

# https://doc.rust-lang.org/beta/unstable-book/compiler-flags/sanitizer.html
RUSTFLAGS=-Zsanitizer=memory cargo +nightly run -Z build-std --target x86_64-unknown-linux-gnu --release

# if we want panic abort. -Z build-std=panic_abort,std

# https://nnethercote.github.io/perf-book/profiling.html
# https://rust-lang.github.io/packed_simd/perf-guide/prof/linux.html
perf record --call-graph=dwarf 
perf record --call-graph=lbr
perf report --hierarchy -M intel

nix-shell -p valgrind kcachegrind graphviz

valgrind --tool=massif ./target/release/nixy

# https://valgrind.org/docs/manual/cg-manual.html
valgrind --tool=cachegrind --branch-sim=yes ./target/release/nixy
cg_annotate 
   
    

# https://kcachegrind.github.io/html/Home.html
kcachegrind cachegrind.out.24077

# https://valgrind.org/docs/manual/cl-manual.html
cargo +nightly build -Z build-std --target x86_64-unknown-linux-gnu --release

cargo clean && RUSTFLAGS="-C target-cpu=native" cargo build --release

valgrind --tool=callgrind --dump-instr=yes --collect-jumps=yes --simulate-cache=yes --branch-sim=yes ./target/release/nixy
kcachegrind callgrind.out.53710

cargo clean && RUSTFLAGS="-C target-cpu=native" cargo build --release
valgrind --tool=massif --stacks=yes ./target/release/nixy
nix-shell -p massif-visualizer
massif-visualizer massif.out.59811

valgrind --tool=dhat ./target/release/nixy

https://github.com/flamegraph-rs/flamegraph
nix-shell -p linuxPackages_latest.perf
cargo install flamegraph
cargo flamegraph

   
You might also like...
A modular implementation of timely dataflow in Rust

Timely Dataflow Timely dataflow is a low-latency cyclic dataflow computational model, introduced in the paper Naiad: a timely dataflow system. This pr

A fast lean and clean modern constraint programming solver implementation (in rust)

MaxiCP-rs This project aims at implementing a fast, and clean constraint programming solver with a focus on correctness, simplicity, maintainability a

Rust implementation of Waku v2 (f.k.a. Whisper)

waku-rs Waku is a p2p messaging protocol tailored for the web3, with origins in Ethereum's Whisper. This Rust implementation is taking reference from

The second Rust implementation on GitHub of third-party REST API client for Bilibili.

Bilibili REST API The second Rust implementation on GitHub of third-party REST API client for Bilibili. Designed to be lightweight and efficient. It's

Rust-only ext4 implementation without unsafe code.

Rust-Ext4 Rust-only ext4 implementation without unsafe code. Supporting features no_std Direct/Indirect Block Addressing (RO) Extent Tree Addressing (

Rust implementation of DVB-GSE

dvb-gse dvg-se is a Rust implementation of the DVB GSE (Generic Stream Encapsulation) protocol and related protocols. It is mainly intended to be used

Rust implementation of Surging Object DiGraph (SODG)

This Rust library implements a Surging Object DiGraph (SODG) for reo virtual machine for EO programs. Here is how you can create a di-graph: use sodg:

Rust library provides a standalone implementation of the ROS (Robot Operating System) core

ROS-core implementation in Rust This Rust library provides a standalone implementation of the ROS (Robot Operating System) core. It allows you to run

A Rust implementation of HyperLogLog trying to be parsimonious with memory.

🧮 HyperLogLog-rs This is a Rust library that provides an implementation of the HyperLogLog (HLL) algorithm, trying to be parsimonious with memory. Wh

Owner
Moritz Hedtke
he/him My username shows how great legacy is...
Moritz Hedtke
lints and suggestions for the nix programming language

statix Lints and suggestions for the Nix programming language. statix highlights antipatterns in Nix code. statix --fix can fix several such occurrenc

Akshay 311 Dec 25, 2022
Secure mTLS and gRPC backed runtime daemon. Alternative to systemd. Written in Rust.

Auraed A runtime daemon written in Rust. Designed to run as pid 1 mTLS backed gRPC API over unix domain socket Run executables Run containers Run virt

Aurae Runtime 57 Dec 22, 2022
A simpler and 5x faster alternative to HashMap in Rust, which doesn't use hashing and doesn't use heap

At least 5x faster alternative of HashMap, for very small maps. It is also faster than FxHashMap, hashbrown, ArrayMap, and nohash-hasher. The smaller

Yegor Bugayenko 12 Apr 19, 2023
Rust implementation of Andrej Karpathy's micrograd for purposes of learning both ML and Rust.

micrograd_rs Rust implementation of Andrej Karpathy's micrograd for purposes of learning both ML and Rust. Main takeaways Basically the same takeaways

null 3 Oct 28, 2022
Ray Tracing: The Next Week implementation in Rust

rttnw Ray Tracing: The Next Week implementation in Rust How to run Install Rust: Link here. Run project git clone https://github.com/luliic2/rttnw cd

null 20 Apr 26, 2022
Rust implementation of µKanren, a featherweight relational programming language.

µKanren-rs This is a Rust implementation of µKanren, a featherweight relational programming language. See the original Scheme implementation here for

Eric Zhang 99 Dec 8, 2022
An implementation of Olm and Megolm in pure Rust.

A Rust implementation of Olm and Megolm vodozemac is a Rust implementation of libolm, a cryptographic library used for end-to-end encryption in Matrix

matrix.org 66 Dec 26, 2022
Pure Rust Implementation of secp256k1.

SECP256K1 implementation in pure Rust Cargo Documentation SECP256K1 implementation with no_std support. Currently we have implementation for: Convert

Parity Technologies 141 Dec 21, 2022
A Rust implementation of generic prefix tree (trie) map with wildcard capture support

prefix_tree_map A Rust implementation of generic prefix tree (trie) map with wildcard capture support. Design Trie is a good data structure for storin

EAimTY 3 Dec 6, 2022
fast rust implementation of online nonnegative matrix factorization as laid out in the paper "detect and track latent factors with online nonnegative matrix factorization"

ONMF status: early work in progress. still figuring this out. code still somewhat messy. api still in flux. fast rust implementation of online nonnega

null 2 Apr 10, 2020