This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #![feature(portable_simd)] | |
| use std::hint::black_box; | |
| use criterion::{BenchmarkId, Criterion, Throughput, criterion_group, criterion_main}; | |
| use std::simd::cmp::SimdPartialEq; | |
| use std::simd::cmp::SimdPartialOrd; | |
| use std::simd::u16x8; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Reproducer for the v4.6.1 roaring_bitmap_to_uint32_array wasm report. | |
| # | |
| # Fetches the official v4.6.1 amalgamation release assets, builds the | |
| # reproducer for wasm32-wasi (using the flags from the bug report) and for the | |
| # native host, then runs both. | |
| # | |
| # make # fetch + build + run everything | |
| # make ZIG=/path/to/zig | |
| # make OPT=ReleaseFast | |
| # make VERSION=v4.5.0 # test a different release (run `make distclean` first) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM debian:12-slim | |
| RUN dpkg --add-architecture i386 && \ | |
| apt-get update && \ | |
| apt-get install -y wget && \ | |
| mkdir -pm755 /etc/apt/keyrings && wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key && \ | |
| wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources && \ | |
| apt-get update && \ | |
| apt-get install -y \ | |
| cabextract \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <assert.h> | |
| #include <errno.h> | |
| #include <fcntl.h> | |
| #include <stdbool.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <sys/mman.h> | |
| #include <sys/stat.h> | |
| #include <sys/xattr.h> | |
| #include <unistd.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from functools import lru_cache | |
| import arcpy | |
| from arcpy import da | |
| base_table = arcpy.GetParameterAsText(0) | |
| files_dir = arcpy.GetParameterAsText(1) | |
| if not (base_table and files_dir): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import print_function | |
| import os.path | |
| import string | |
| import sys | |
| from functools import lru_cache | |
| import arcpy | |
| from arcpy import da |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::sync::{Arc, Mutex, MutexGuard}; | |
| use std::thread; | |
| use std::thread::JoinHandle; | |
| type SafeNode = Arc<Mutex<TreeNode>>; | |
| #[derive(Debug)] | |
| struct TreeNode { | |
| value: u16, | |
| children: Vec<TreeNode>, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extern crate rand; | |
| use rand::{thread_rng, Rng}; | |
| use rand::distributions::{Normal, IndependentSample}; | |
| struct SinglePack { | |
| open_block: Vec<f64>, | |
| open_sum: f64, | |
| blocks: Vec<Vec<f64>>, | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Implementation contributed by https://github.com/Maplicant | |
| // Optimized game implementation in Rust | |
| extern crate time; | |
| use time::precise_time_ns; | |
| use std::ops::{Add, Sub, Mul}; | |
| const NUM_BLOCKS: usize = 65535; | |
| const NUM_ENTITIES: usize = 1000; | |
| const CHUNK_COUNT: usize = 100; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let start = time::now(); | |
| let metadata = try!(fs::metadata(&path)); | |
| let mut file = try!(File::open(&path)); | |
| let mut buf = vec![0u8; metadata.len() as usize]; | |
| try!(file.read(&mut buf)); | |
| buf.make_ascii_lowercase(); | |
| let mut str: &str = try!(str::from_utf8(&buf)); |
NewerOlder