-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc376fb
commit 57641d5
Showing
8 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[package] | ||
name = "semantic-typediff-rs" | ||
version = "0.0.0" | ||
authors = [ | ||
"Samantha Nguyen, <[email protected]>", | ||
"Alfredo Gutierrez <[email protected]>" | ||
] | ||
description = "Provies semantic diffing" | ||
repository = "https://github.com/nlp-rs/typediff.git" | ||
readme = "README.md" | ||
keywords = ["nlp", "lemma", "morphemes", "nouns",] | ||
categories = ["data-structures", "algorithms", "text-processing", "text-editors"] | ||
license = "MIT OR Apache-2.0" | ||
edition = "2021" | ||
rust-version = "1.63.0" | ||
|
||
[dev-dependencies] | ||
criterion = { version = "0.4.0", features = ["html_reports"] } | ||
iai = "0.1.0" | ||
|
||
# criterion benchmarks | ||
[[bench]] | ||
path = "benches/criterion/fibb.rs" | ||
name = "criterion_fibb" | ||
harness = false | ||
|
||
# iai benchmarks | ||
[[bench]] | ||
path = "benches/iai/fibb.rs" | ||
name = "iai_fibb" | ||
harness = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# semantic_typediff | ||
[![License](https://img.shields.io/badge/license-MIT%20%26%20Apache%202.0-green)](#license) | ||
[![CI](https://github.com/nlp-rs/typediff/actions/workflows/main.yml/badge.svg)](https://github.com/nlp-rs/typediff/actions/workflows/main.yml) | ||
[![Security audit](https://github.com/nlp-rs/typediff/actions/workflows/security-audit.yml/badge.svg)](https://github.com/nlp-rs/typediff/actions/workflows/security-audit.yml) | ||
> warning: **typediff is currently experimental** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use criterion::{black_box, criterion_group, criterion_main, Criterion}; | ||
|
||
#[inline] | ||
fn fibonacci(n: u64) -> u64 { | ||
match n { | ||
0 => 1, | ||
1 => 1, | ||
n => fibonacci(n - 1) + fibonacci(n - 2), | ||
} | ||
} | ||
|
||
pub fn criterion_benchmark(c: &mut Criterion) { | ||
c.bench_function("fib 20", |b| b.iter(|| fibonacci(black_box(20)))); | ||
} | ||
|
||
criterion_group!(benches, criterion_benchmark); | ||
criterion_main!(benches); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use iai::{black_box, main}; | ||
|
||
fn fibonacci(n: u64) -> u64 { | ||
match n { | ||
0 => 1, | ||
1 => 1, | ||
n => fibonacci(n - 1) + fibonacci(n - 2), | ||
} | ||
} | ||
|
||
fn iai_benchmark_short() -> u64 { | ||
fibonacci(black_box(10)) | ||
} | ||
|
||
fn iai_benchmark_long() -> u64 { | ||
fibonacci(black_box(30)) | ||
} | ||
|
||
main!(iai_benchmark_short, iai_benchmark_long); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
target | ||
corpus | ||
artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[package] | ||
name = "rust-template-fuzz" | ||
version = "0.0.0" | ||
authors = ["Automatically generated"] | ||
publish = false | ||
edition = "2018" | ||
|
||
[package.metadata] | ||
cargo-fuzz = true | ||
|
||
[dependencies] | ||
libfuzzer-sys = "0.4" | ||
|
||
[dependencies.rust-template] | ||
path = ".." | ||
|
||
# Prevent this from interfering with workspaces | ||
[workspace] | ||
members = ["."] | ||
|
||
[[bin]] | ||
name = "fuzz_target_1" | ||
path = "fuzz_targets/fuzz_target_1.rs" | ||
test = false | ||
doc = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#![no_main] | ||
use libfuzzer_sys::fuzz_target; | ||
|
||
fuzz_target!(|data: &[u8]| { | ||
// fuzzed code goes here | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#![doc = include_str!("../README.md")] |