This file contains 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
# i +=17 | |
$ hyperfine -w2 ./main # aligned(1) | |
Benchmark 1: ./main | |
Time (mean ± σ): 52.4 ms ± 3.3 ms [User: 16.9 ms, System: 31.7 ms] | |
Range (min … max): 48.5 ms … 65.0 ms 47 runs | |
$ hyperfine -w2 ./main # aligned(4), ~+10% | |
Benchmark 1: ./main | |
Time (mean ± σ): 57.6 ms ± 3.0 ms [User: 18.8 ms, System: 34.5 ms] |
This file contains 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 <stdint.h> | |
#include <stdio.h> | |
#include <stdalign.h> | |
#include <assert.h> | |
#include <sys/mman.h> | |
//#include <x86intrin.h> | |
#define COUNT 4096 | |
struct __attribute__((packed)) { |
This file contains 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
$ cpuid | |
CPU 0: | |
vendor_id = "GenuineIntel" | |
version information (1/eax): | |
processor type = primary processor (0) | |
family = 0xf (15) | |
model = 0xb (11) | |
stepping id = 0x1 (1) | |
extended family = 0x0 (0) | |
extended model = 0x6 (6) |
This file contains 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
const std = @import("std"); | |
const math = std.math; | |
const AlignedStruct = struct { | |
a: u16, | |
b: u16, | |
c: u8, | |
}; | |
pub fn main() !void { |
This file contains 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
javascript:(function() { | |
Array.from(document.getElementsByTagName('c-wiz')) | |
.map(tag => ({ | |
threadId: tag.getAttribute('data-topic-id'), | |
firstMessage: tag.children[0].getAttribute('aria-label') | |
})) | |
.filter(thread => thread.threadId != null && thread.firstMessage != null) | |
.forEach(thread => console.log(window.location.href + '/' + thread.threadId | |
+ " : " + thread.firstMessage)) | |
}()) |
This file contains 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
trait Wrap { | |
fn pass<F>(&self, consumer: F) where F: Fn(&Self) { | |
consumer(self) | |
} | |
} | |
struct Stringy(String); | |
impl Wrap for Stringy { | |
} |
This file contains 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
#!/bin/bash | |
set -ex | |
if [ -d .git/ ]; then | |
git remote set-url origin "$BUILDKITE_REPO" | |
else | |
git clone "$BUILDKITE_REPO" . | |
fi | |
git clean -fdqx |
This file contains 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
package clinteastwood; | |
import java.awt.Color; | |
import java.util.Random; | |
import robocode.AdvancedRobot; | |
import robocode.ScannedRobotEvent; | |
public class ClintBot extends AdvancedRobot { | |
private final Random random = new Random(); |
This file contains 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
[package] | |
name = "lost-links" | |
version = "0.1.0" | |
authors = ["Andrew Barchuk <[email protected]>"] | |
[dependencies] | |
curl = "0.3.6" # -> winapi:0.2 | |
regex = "0.1.52" | |
url = "1.2.0" | |
clap = "2.12.1" # -> winapi:~0.2.8 |
This file contains 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
converting number 13 to String | |
temporary number is currently 13 | |
current digit 3 | |
current digit as string Three | |
current string value of number Three | |
temporary number is currently 1 | |
current digit 1 | |
current digit as string One | |
current string value of number OneThree | |
converting number 52 to String |
NewerOlder