Skip to content

Instantly share code, notes, and snippets.

View Robbepop's full-sized avatar
🐣

Robin Freyler Robbepop

🐣
  • Berlin
View GitHub Profile
➜ wasmi git:(rf-experiment-remove-inline) ✗ cargo bench --bench benches execute -- --baseline master
Compiling wasmi v0.32.0-beta.7 (/Users/gorskimateusz/projects/aleph/wasmi/crates/wasmi)
Finished bench [optimized] target(s) in 35.65s
Running benches/benches.rs (target/release/deps/benches-c2deff865b25ac6c)
execute/tiny_keccak time: [236.24 µs 239.55 µs 243.54 µs]
change: [+3.0244% +4.4601% +6.3946%] (p = 0.00 < 0.05)
Performance has regressed.
Found 2 outliers among 10 measurements (20.00%)
2 (20.00%) high mild
@Kestrer
Kestrer / how-to-write-hygienic-macros.md
Created October 17, 2020 05:35
A guide on how to write hygienic Rust macros

How to Write Hygienic Rust Macros

Macro hygiene is the concept of macros that work in all contexts; they don't affect and aren't affected by anything around them. Ideally all macros would be fully hygienic, but there are lots of pitfalls and traps that make it all too easy to accidentally write unhygienic macros. This guide attempts to provide a comprehensive resource for writing the most hygienic macros.

Understanding the Module System

First, a little aside on the details of Rust's module system, and specifically paths; it is

@kmcallister
kmcallister / .travis.yml
Created June 6, 2017 21:00
travis setup for clippy (untested)
language: rust
rust:
- stable
- beta
- nightly
script:
- cargo build --verbose
- cargo test --verbose
- if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then cargo install clippy && cargo clippy; fi
@Robbepop
Robbepop / .rustfmt.toml
Created March 16, 2017 18:19
.rustfmt.toml with all configs, descriptions, parameters and defaults for version 0.7.1 of rustfmt.
# ----------------------------------------------------------------------------------
# r u s t f m t - C O N F I G
# ==================================================================================
#
# Version: 0.7.1
# Author : Robbepop <robbepop@web.de>
#
# A predefined .rustfmt.toml file with all configuration options and their
# associated description, possible values and default values for use in other
# projects.
@lichray
lichray / make_array.cc
Last active August 29, 2023 16:37
Factory function of std::array
#include <array>
#include <functional>
template <typename... T>
using common_type_t = typename std::common_type<T...>::type;
template <typename T>
using remove_cv_t = typename std::remove_cv<T>::type;
template <bool, typename T, typename... U>