Skip to content

Commit

Permalink
Update benchmarks to better measure things we care about
Browse files Browse the repository at this point in the history
  • Loading branch information
CeleritasCelery committed Feb 2, 2023
1 parent f8b943c commit fbcea08
Show file tree
Hide file tree
Showing 5 changed files with 232 additions and 16 deletions.
14 changes: 8 additions & 6 deletions benches/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ use str_indices::{chars, lines, lines_crlf, lines_lf, utf16};
fn all(c: &mut Criterion) {
// Load benchmark strings.
let test_strings: Vec<(&str, String)> = vec![
("en_0001", "E".into()),
(
"en_0010",
fs::read_to_string("benches/text/en_10.txt").expect("Cannot find benchmark text."),
),
(
"en_0100",
fs::read_to_string("benches/text/en_100.txt").expect("Cannot find benchmark text."),
Expand All @@ -19,7 +14,10 @@ fn all(c: &mut Criterion) {
"en_1000",
fs::read_to_string("benches/text/en_1000.txt").expect("Cannot find benchmark text."),
),
("jp_0003", "日".into()),
(
"en_10000",
fs::read_to_string("benches/text/en_10000.txt").expect("Cannot find benchmark text."),
),
(
"jp_0102",
fs::read_to_string("benches/text/jp_102.txt").expect("Cannot find benchmark text."),
Expand All @@ -28,6 +26,10 @@ fn all(c: &mut Criterion) {
"jp_1001",
fs::read_to_string("benches/text/jp_1001.txt").expect("Cannot find benchmark text."),
),
(
"jp_10000",
fs::read_to_string("benches/text/jp_10000.txt").expect("Cannot find benchmark text."),
),
];

//---------------------------------------------------------
Expand Down
11 changes: 7 additions & 4 deletions benches/text/en_1000.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
English is a West Germanic language that was first spoken in early medieval England and eventually became a global lingua franca.[4][5] It is named after the Angles, one of the Germanic tribes that migrated to the area of Great Britain that later took their name, as England.
English is a West Germanic language that was first spoken in early
medieval England and eventually became a global lingua franca.[4][5] It is named after the Angles, one of the Germanic tribes that migrated to the area of Great Britain that later took their name, as England.

Both names derive from Anglia, a peninsula in the Baltic Sea. The language is closely related to Frisian and Low Saxon, and its vocabulary has been significantly influenced by other Germanic languages, particularly Norse (a North Germanic language), and to a greater extent by Latin and French.[6]
Both names derive from Anglia, a peninsula in the Baltic Sea. The language is closely
related to Frisian and Low Saxon, and its vocabulary has been significantly influenced by other Germanic languages, particularly Norse (a North Germanic language), and to a greater extent by Latin and French.[6]

English has developed over the course of more than 1,400 years. The earliest forms of English, a group of West Germanic (Ingvaeonic) dialects brought to Great Britain by Anglo-Saxon settlers in the 5th century, are collectively called Old English.
English has developed over the course of more than 1,400 years. The earliest forms of English, a group of West Germanic (Ingvaeonic) dialects brought to Great Britain by Anglo-Saxon settlers in the 5th century, are collectively called Old English.

Middle English began in the late 11th century with the Norman conquest of England; this was a period in which the language was influenced by French.[7] Early Modern English b

Middle English began in the late 11th century with the Norman conquest of England; this was a period in which the language was influenced by French.[7] Early Modern English b
Expand Down
100 changes: 100 additions & 0 deletions benches/text/en_10000.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
English is a West Germanic language that was first spoken in early
medieval England and eventually became a global lingua franca.[4][5] It is named after the Angles, one of the Germanic tribes that migrated to the area of Great Britain that later took their name, as England.

Both names derive from Anglia, a peninsula in the Baltic Sea. The language is closely
related to Frisian and Low Saxon, and its vocabulary has been significantly influenced by other Germanic languages, particularly Norse (a North Germanic language), and to a greater extent by Latin and French.[6]

English has developed over the course of more than 1,400 years. The earliest forms of English, a group of West Germanic (Ingvaeonic) dialects brought to Great Britain by Anglo-Saxon settlers in the 5th century, are collectively called Old English.

Middle English began in the late 11th century with the Norman conquest of England; this was a period in which the language was influenced by French.[7] Early Modern English b
English is a West Germanic language that was first spoken in early
medieval England and eventually became a global lingua franca.[4][5] It is named after the Angles, one of the Germanic tribes that migrated to the area of Great Britain that later took their name, as England.

Both names derive from Anglia, a peninsula in the Baltic Sea. The language is closely
related to Frisian and Low Saxon, and its vocabulary has been significantly influenced by other Germanic languages, particularly Norse (a North Germanic language), and to a greater extent by Latin and French.[6]

English has developed over the course of more than 1,400 years. The earliest forms of English, a group of West Germanic (Ingvaeonic) dialects brought to Great Britain by Anglo-Saxon settlers in the 5th century, are collectively called Old English.

Middle English began in the late 11th century with the Norman conquest of England; this was a period in which the language was influenced by French.[7] Early Modern English b

English is a West Germanic language that was first spoken in early
medieval England and eventually became a global lingua franca.[4][5] It is named after the Angles, one of the Germanic tribes that migrated to the area of Great Britain that later took their name, as England.

Both names derive from Anglia, a peninsula in the Baltic Sea. The language is closely
related to Frisian and Low Saxon, and its vocabulary has been significantly influenced by other Germanic languages, particularly Norse (a North Germanic language), and to a greater extent by Latin and French.[6]

English has developed over the course of more than 1,400 years. The earliest forms of English, a group of West Germanic (Ingvaeonic) dialects brought to Great Britain by Anglo-Saxon settlers in the 5th century, are collectively called Old English.

Middle English began in the late 11th century with the Norman conquest of England; this was a period in which the language was influenced by French.[7] Early Modern English b

English is a West Germanic language that was first spoken in early
medieval England and eventually became a global lingua franca.[4][5] It is named after the Angles, one of the Germanic tribes that migrated to the area of Great Britain that later took their name, as England.

Both names derive from Anglia, a peninsula in the Baltic Sea. The language is closely
related to Frisian and Low Saxon, and its vocabulary has been significantly influenced by other Germanic languages, particularly Norse (a North Germanic language), and to a greater extent by Latin and French.[6]

English has developed over the course of more than 1,400 years. The earliest forms of English, a group of West Germanic (Ingvaeonic) dialects brought to Great Britain by Anglo-Saxon settlers in the 5th century, are collectively called Old English.

Middle English began in the late 11th century with the Norman conquest of England; this was a period in which the language was influenced by French.[7] Early Modern English b

English is a West Germanic language that was first spoken in early
medieval England and eventually became a global lingua franca.[4][5] It is named after the Angles, one of the Germanic tribes that migrated to the area of Great Britain that later took their name, as England.

Both names derive from Anglia, a peninsula in the Baltic Sea. The language is closely
related to Frisian and Low Saxon, and its vocabulary has been significantly influenced by other Germanic languages, particularly Norse (a North Germanic language), and to a greater extent by Latin and French.[6]

English has developed over the course of more than 1,400 years. The earliest forms of English, a group of West Germanic (Ingvaeonic) dialects brought to Great Britain by Anglo-Saxon settlers in the 5th century, are collectively called Old English.

Middle English began in the late 11th century with the Norman conquest of England; this was a period in which the language was influenced by French.[7] Early Modern English b

English is a West Germanic language that was first spoken in early
medieval England and eventually became a global lingua franca.[4][5] It is named after the Angles, one of the Germanic tribes that migrated to the area of Great Britain that later took their name, as England.

Both names derive from Anglia, a peninsula in the Baltic Sea. The language is closely
related to Frisian and Low Saxon, and its vocabulary has been significantly influenced by other Germanic languages, particularly Norse (a North Germanic language), and to a greater extent by Latin and French.[6]

English has developed over the course of more than 1,400 years. The earliest forms of English, a group of West Germanic (Ingvaeonic) dialects brought to Great Britain by Anglo-Saxon settlers in the 5th century, are collectively called Old English.

Middle English began in the late 11th century with the Norman conquest of England; this was a period in which the language was influenced by French.[7] Early Modern English b

English is a West Germanic language that was first spoken in early
medieval England and eventually became a global lingua franca.[4][5] It is named after the Angles, one of the Germanic tribes that migrated to the area of Great Britain that later took their name, as England.

Both names derive from Anglia, a peninsula in the Baltic Sea. The language is closely
related to Frisian and Low Saxon, and its vocabulary has been significantly influenced by other Germanic languages, particularly Norse (a North Germanic language), and to a greater extent by Latin and French.[6]

English has developed over the course of more than 1,400 years. The earliest forms of English, a group of West Germanic (Ingvaeonic) dialects brought to Great Britain by Anglo-Saxon settlers in the 5th century, are collectively called Old English.

Middle English began in the late 11th century with the Norman conquest of England; this was a period in which the language was influenced by French.[7] Early Modern English b

English is a West Germanic language that was first spoken in early
medieval England and eventually became a global lingua franca.[4][5] It is named after the Angles, one of the Germanic tribes that migrated to the area of Great Britain that later took their name, as England.

Both names derive from Anglia, a peninsula in the Baltic Sea. The language is closely
related to Frisian and Low Saxon, and its vocabulary has been significantly influenced by other Germanic languages, particularly Norse (a North Germanic language), and to a greater extent by Latin and French.[6]

English has developed over the course of more than 1,400 years. The earliest forms of English, a group of West Germanic (Ingvaeonic) dialects brought to Great Britain by Anglo-Saxon settlers in the 5th century, are collectively called Old English.

Middle English began in the late 11th century with the Norman conquest of England; this was a period in which the language was influenced by French.[7] Early Modern English b

English is a West Germanic language that was first spoken in early
medieval England and eventually became a global lingua franca.[4][5] It is named after the Angles, one of the Germanic tribes that migrated to the area of Great Britain that later took their name, as England.

Both names derive from Anglia, a peninsula in the Baltic Sea. The language is closely
related to Frisian and Low Saxon, and its vocabulary has been significantly influenced by other Germanic languages, particularly Norse (a North Germanic language), and to a greater extent by Latin and French.[6]

English has developed over the course of more than 1,400 years. The earliest forms of English, a group of West Germanic (Ingvaeonic) dialects brought to Great Britain by Anglo-Saxon settlers in the 5th century, are collectively called Old English.

Middle English began in the late 11th century with the Norman conquest of England; this was a period in which the language was influenced by French.[7] Early Modern English b

English is a West Germanic language that was first spoken in early
medieval England and eventually became a global lingua franca.[4][5] It is named after the Angles, one of the Germanic tribes that migrated to the area of Great Britain that later took their name, as England.

Both names derive from Anglia, a peninsula in the Baltic Sea. The language is closely
related to Frisian and Low Saxon, and its vocabulary has been significantly influenced by other Germanic languages, particularly Norse (a North Germanic language), and to a greater extent by Latin and French.[6]

English has developed over the course of more than 1,400 years. The earliest forms of English, a group of West Germanic (Ingvaeonic) dialects brought to Great Britain by Anglo-Saxon settlers in the 5th century, are collectively called Old English.

Middle English began in the late 11th century with the Norman conquest of England; this was a period in which the language was influenced by French.[7] Early Modern English b


Expand Down
Loading

0 comments on commit fbcea08

Please sign in to comment.