Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/MojoLlama/blob/main/src/mojollama/kernels/mojo_api_v3.mojo # MojoLlama Archived Mojo/MAX quantizer and serving research repository (read-only history) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `MojoLlama / src / mojollama / kernels / mojo_api_v3.mojo` 21 lines ยท 538 bytes Raw Blame History 1 from std.prelude import * 2 from std import time 3 4 fn main(): 5 # Test time 6 var t0 = time.perf_counter() 7 var s: Float64 = 0.0 8 for i in range(`10000000`): 9 s += 0.`00000001` 10 var t1 = time.perf_counter() 11 print("Time: ", (t1 - t0) * 1000, "ms") 12 13 # Test Pointer with origin 14 var arr = InlineArray[UInt8, 100]() 15 for i in range(100): 16 arr[i] = UInt8(i & 0xFF) 17 print("arr[42]: ", arr[42]) 18 19 # Get pointer from InlineArray 20 var ptr = arr.unsafe_ptr() 21 print("ptr[42]: ", ptr.load(42))