Skip to content

Instantly share code, notes, and snippets.

@pquentin
pquentin / secretly_sync.py
Created September 8, 2023 06:26
Experimenting with run_secretly_sync_async_fn
import trio
class SyncBackend:
def return_2(self):
return 2
class AsyncBackend:
async def return_2(self):
@pquentin
pquentin / employees.kql
Created March 11, 2024 09:50
Dev Console queries to create the ES|QL employees test dataset
PUT employees
{
"mappings": {
"properties": {
"avg_worked_seconds": {
"type": "long"
},
"birth_date": {
"type": "date"
},
@pquentin
pquentin / hyperfine.md
Created December 2, 2024 19:21
Parsing a JSON file using Serde in Rust

Benchmark results

Using a M3 MacBook.

from_file

❯ hyperfine target/release/json-rust --warmup 5 --runs 10
Benchmark 1: target/release/json-rust
 Time (mean ± σ): 8.475 s ± 0.020 s [User: 1.872 s, System: 6.595 s]