mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-07-30 13:47:46 +00:00
add turtle benchmark and reorganize (#259)
This commit is contained in:
parent
7d5c2f0a2e
commit
0ea59f4eaa
8 changed files with 20 additions and 0 deletions
5
benchmarks/README.md
Normal file
5
benchmarks/README.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Benchmark Scripts
|
||||
|
||||
### Definition
|
||||
|
||||
These scripts are used to benchmark certain aspects of nushell.
|
15
benchmarks/turtle.nu
Normal file
15
benchmarks/turtle.nu
Normal file
|
@ -0,0 +1,15 @@
|
|||
# The infamous turtle benchmark
|
||||
def turtle [column: string] {
|
||||
wrap $column | table
|
||||
}
|
||||
|
||||
print -n "Turtle 1 = "
|
||||
"turtle" | turtle 1 | str length
|
||||
print -n "Turtle 2 = "
|
||||
"turtle" | turtle 1 | turtle 2 | str length
|
||||
print -n "Turtle 3 = "
|
||||
"turtle" | turtle 1 | turtle 2 | turtle 3 | str length
|
||||
print -n "Turtle 4 = "
|
||||
"turtle" | turtle 1 | turtle 2 | turtle 3 | turtle 4 | str length
|
||||
print -n "Turtle 5 = "
|
||||
"turtle" | turtle 1 | turtle 2 | turtle 3 | turtle 4 | turtle 5 | str length
|
Loading…
Add table
Add a link
Reference in a new issue