Skip to content

Add new tt-muncher benchmark. #1290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions collector/benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ compiler in interesting ways.
- **token-stream-stress**: Constructs a long token stream much like the `quote`
crate does, which caused [quadratic
behavior](https://github.com/rust-lang/rust/issues/65080) in the past.
- **tt-muncher**: Calls a quadratic TT muncher macro (based on `quote::quote!`)
with a long input, which stresses macro expansion.
- **tuple-stress**: Contains a single array of 65,535 nested `(i32, (f64, f64,
f64))` tuples. The data was extracted and reduced from a [program dealing
with grid coordinates](https://github.com/urschrei/ostn15_phf) that was
Expand Down
32 changes: 32 additions & 0 deletions collector/benchmarks/tt-muncher/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions collector/benchmarks/tt-muncher/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "tt-muncher"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
quote = { path = "./quote-1.0.17-modified" }

[workspace]
4 changes: 4 additions & 0 deletions collector/benchmarks/tt-muncher/perf-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"touch_file": "src/main.rs",
"category": "secondary"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"git": {
"sha1": "0ec6e20dc9c448d53a0c6d66a76a4cd8f2126d03"
},
"path_in_vcs": ""
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
msrv = "1.31.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: dtolnay
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI

on:
push:
pull_request:
schedule: [cron: "40 1 * * *"]

env:
RUSTFLAGS: '-Dwarnings'

jobs:
test:
name: Rust ${{matrix.rust}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [stable, beta, 1.36.0]
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- run: cargo test

nightly:
name: Rust nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
with:
components: rust-src
- run: cargo test
- run: cargo update -Z minimal-versions
- run: cargo build

msrv:
name: Rust 1.31.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/[email protected]
- run: cargo check

clippy:
name: Clippy
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@clippy
- run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic

outdated:
name: Outdated
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v2
- uses: dtolnay/install@cargo-outdated
- run: cargo outdated --exit-code 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
/Cargo.lock
45 changes: 45 additions & 0 deletions collector/benchmarks/tt-muncher/quote-1.0.17-modified/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2018"
rust-version = "1.31"
name = "quote"
version = "1.0.17"
authors = ["David Tolnay <[email protected]>"]
autobenches = false
description = "Quasi-quoting macro quote!(...)"
documentation = "https://docs.rs/quote/"
readme = "README.md"
keywords = ["syn"]
categories = ["development-tools::procedural-macro-helpers"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/dtolnay/quote"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies.proc-macro2]
version = "1.0.36"
default-features = false

# This is not needed for the `tt-muncher` benchmark.
#[dev-dependencies.rustversion]
#version = "1.0"

# This is not needed for the `tt-muncher` benchmark.
#[dev-dependencies.trybuild]
#version = "1.0.52"
#features = ["diff"]

[features]
default = ["proc-macro"]
proc-macro = ["proc-macro2/proc-macro"]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading