Benchmarks: - Add fib, list_ops, primes benchmarks comparing Lux vs Node.js vs Rust - Lux matches Rust performance and is 8-30x faster than Node.js - Add docs/benchmarks.md documenting results LSP improvements: - Context-aware completions (module access vs general) - Add List, String, Option, Result, Console, Math method completions - Add type and builtin completions - Hover now shows type signatures and documentation for known symbols - Hover returns formatted markdown with code blocks Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
11 lines
212 B
Rust
11 lines
212 B
Rust
// Fibonacci benchmark - recursive implementation
|
|
fn fib(n: i64) -> i64 {
|
|
if n <= 1 { n }
|
|
else { fib(n - 1) + fib(n - 2) }
|
|
}
|
|
|
|
fn main() {
|
|
let result = fib(35);
|
|
println!("fib(35) = {}", result);
|
|
}
|