Skip to content

Commit 0ea59f4

Browse files
authored
add turtle benchmark and reorganize (nushell#259)
1 parent 7d5c2f0 commit 0ea59f4

File tree

8 files changed

+20
-0
lines changed

8 files changed

+20
-0
lines changed

benchmarks/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Benchmark Scripts
2+
3+
### Definition
4+
5+
These scripts are used to benchmark certain aspects of nushell.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

benchmarks/turtle.nu

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# The infamous turtle benchmark
2+
def turtle [column: string] {
3+
wrap $column | table
4+
}
5+
6+
print -n "Turtle 1 = "
7+
"turtle" | turtle 1 | str length
8+
print -n "Turtle 2 = "
9+
"turtle" | turtle 1 | turtle 2 | str length
10+
print -n "Turtle 3 = "
11+
"turtle" | turtle 1 | turtle 2 | turtle 3 | str length
12+
print -n "Turtle 4 = "
13+
"turtle" | turtle 1 | turtle 2 | turtle 3 | turtle 4 | str length
14+
print -n "Turtle 5 = "
15+
"turtle" | turtle 1 | turtle 2 | turtle 3 | turtle 4 | turtle 5 | str length

0 commit comments

Comments
 (0)