- Automatically bump SemVer
- Update a personal homebrew tap
- Keep that pesky version in the Cargo.toml up to date
- (From dependabot) Get new versions out as soon as possible
- You don't want a changelog
spion@missperfect:~/Projects/testhash$ gcc -O3 test.c -o testc | |
spion@missperfect:~/Projects/testhash$ time ./testc | |
The 1000000 | |
a 2000000 | |
at 1000000 | |
brown 1000000 | |
dog 1000000 | |
era 1000000 | |
fox 1000000 | |
jumped 1000000 |
#ifdef _WIN32 | |
#include <malloc.h> | |
#endif | |
#include <cstdint> | |
#include <vector> | |
#include <iostream> | |
/** | |
* Allocator for aligned data. |
/* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
*/ | |
#include <arpa/inet.h> | |
#include <linux/if_packet.h> | |
#include <linux/ip.h> |
/* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
*/ | |
#include <arpa/inet.h> | |
#include <linux/if_packet.h> | |
#include <stdio.h> |
CL_SUCCESS 0 | |
CL_DEVICE_NOT_FOUND -1 | |
CL_DEVICE_NOT_AVAILABLE -2 | |
CL_COMPILER_NOT_AVAILABLE -3 | |
CL_MEM_OBJECT_ALLOCATION_FAILURE -4 | |
CL_OUT_OF_RESOURCES -5 | |
CL_OUT_OF_HOST_MEMORY -6 | |
CL_PROFILING_INFO_NOT_AVAILABLE -7 | |
CL_MEM_COPY_OVERLAP -8 | |
CL_IMAGE_FORMAT_MISMATCH -9 |
let offset = 20000; | |
let chunk_size = 10000; | |
// File handle: | |
let mut handle = BufReader::new(File::open("data.bin").await?); | |
// Set cursor to needed chunk: | |
let mut chunk_stream = handle | |
.bytes() | |
.skip(offset) |
#![feature(unique)] | |
use std::thread::spawn; | |
// operating on a vector in parallel | |
fn main() { | |
let mut data:Vec<u32> = vec![1u32, 2, 3]; | |
println!("{:?}", data); | |
let head = data.as_mut_ptr(); | |
let mut guards = (0..3).map(|i| |
// Here is an extremely simple version of work scheduling for multiple | |
// processors. | |
// | |
// The Problem: | |
// We have a lot of numbers that need to be math'ed. Doing this on one | |
// CPU core is slow. We have 4 CPU cores. We would thus like to use those | |
// cores to do math, because it will be a little less slow (ideally | |
// 4 times faster actually). | |
// | |
// The Solution: |
Video - Rust Tip - Customize Mutable Colors in VSCode
In the settings.json
add the following:
"editor.semanticTokenColorCustomizations": {