mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-05-02 04:21:43 +01:00
Changed . token to _dot
This change allows the dotfiles to work with chezmoi (e.g: on windows) and improves grepability with neovim/telescope
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env nu
|
||||
# This benchmark covers the evaluation performance of some very simple, iterative Nushell code that
|
||||
# doesn't require a bunch of calls into nested closures and doesn't rely on commands to do any
|
||||
# heavy lifting.
|
||||
#
|
||||
# Originally added by @devyn to show what absolute best case performance for IR evaluation can look
|
||||
# like. Not super representative of normal Nushell code.
|
||||
|
||||
use std bench
|
||||
|
||||
def fib [n: int] {
|
||||
mut a = 0
|
||||
mut b = 1
|
||||
for _ in 2..=$n {
|
||||
let c = $a + $b
|
||||
$a = $b
|
||||
$b = $c
|
||||
}
|
||||
$b
|
||||
}
|
||||
|
||||
def main [] {
|
||||
print (bench -n 1000 { 0..50 | each { |n| fib $n } } | reject times)
|
||||
}
|
||||
Reference in New Issue
Block a user