Skip to content

Instantly share code, notes, and snippets.

gnzlbg gnzlbg

View GitHub Profile
View gist:e07a8e237bd7a5829b72b4c38d420e09
;; Emacs: 28.0.50 Tramp: 2.5.0-pre -*- mode: outline; -*-
;; Location: /usr/local/Cellar/emacs-plus/HEAD-962562c/share/emacs/28.0.50/lisp/net/tramp.elc Git: /
15:52:26.791947 tramp-get-file-property (8) # file-attributes-string nil
15:52:26.793260 tramp-get-connection-property (7) # stat undef
15:52:26.793416 tramp-get-connection-property (7) # uname
15:52:26.793534 tramp-get-remote-stat (5) # Finding a suitable ‘stat’ command
15:52:26.793645 tramp-get-connection-property (7) # process-buffer nil
15:52:26.793800 tramp-get-connection-property (7) # process-buffer nil
15:52:26.793927 tramp-set-connection-property (7) # process-buffer nil
15:52:26.794058 tramp-get-connection-property (7) # process-buffer nil
View lsblk -f
nvme0n1
nvme0n1p1 vfat FAT32 ...
nvme0n1p2 crypto_LUKS 1 451331e2-e9a1-42d8-aff8-6dff4fd1944b
cryptroot btrfs root fef6185f-0281-4006-80c6-bf85efe0b63d
@gnzlbg
gnzlbg / compatible_trait.md
Last active Dec 13, 2019
Compatible and TryCompatible traits
View compatible_trait.md

Summary

This proposal introduces two traits, Compatible and TryCompatible, which allows specifying safe mem::transmute relationships and performing them in an

View report
Consider this code:
struct foo {};
int id_foo(struct foo bar, int x) {
return x;
}
int id(int x) {
return x;
}
View simd.mir
// WARNING: This output format is intended for human consumers only
// and is subject to change without notice. Knock yourself out.
fn S(_1: [f32; _]) -> S<N> {
let mut _0: S<N>; // return place in scope 0 at /Users/gnzlbg/projects/sideprojects/rust/src/test/ui/simd/simd-generics.rs:9:1: 9:36
bb0: {
(_0.0: [f32; _]) = move _1; // bb0[0]: scope 0 at /Users/gnzlbg/projects/sideprojects/rust/src/test/ui/simd/simd-generics.rs:9:1: 9:36
return; // bb0[1]: scope 0 at /Users/gnzlbg/projects/sideprojects/rust/src/test/ui/simd/simd-generics.rs:9:1: 9:36
}
}
View gist:b282db61d37e305b7ca153d41f179f7c
name old ns/iter new ns/iter diff ns/iter diff % speedup
acos 3 2 -1 -33.33% x 1.50
acosf 2 3 1 50.00% x 0.67
acosh 114 132 18 15.79% x 0.86
acoshf 48 52 4 8.33% x 0.92
asin 2 4 2 100.00% x 0.50
asinf 2 3 1 50.00% x 0.67
atan 13 15 2 15.38% x 0.87
atan2 23 22 -1 -4.35% x 1.05
atan2f 11 15 4 36.36% x 0.73
View gist:06893e29c14692fd9ff869a7bf210315
[error]: Function "erf" not `extern "C"`
[error]: Function "erfc" not `extern "C"`
[error]: Function "floor" not `extern "C"`
[error]: Function "exp2f" not `extern "C"`
[error]: Function "fmaxf" not `extern "C"`
[error]: Function "fdimf" not `extern "C"`
[error]: Function "fmodf" not `extern "C"`
[error]: Function "ldexp" not `extern "C"`
[error]: Function "modf" not `extern "C"`
[error]: Function "modf" missing `#[inline]` and `#[no_panic]` attributes
View regex bench
name old ns/iter new ns/iter diff ns/iter diff % speedup
misc::anchored_literal_long_match 32 (12187 MB/s) 29 (13448 MB/s) -3 -9.38% x 1.10
misc::anchored_literal_long_non_match 35 (11142 MB/s) 35 (11142 MB/s) 0 0.00% x 1.00
misc::anchored_literal_short_match 32 (812 MB/s) 29 (896 MB/s) -3 -9.38% x 1.10
misc::anchored_literal_short_non_match 32 (812 MB/s) 35 (742 MB/s) 3 9.38% x 0.91
misc::easy0_1K 40 (26275 MB/s) 39 (26948 MB/s) -1 -2.50% x 1.03
misc::easy0_1MB 62 (16912951 MB/s) 66 (15887924 MB/s) 4 6.45% x 0.94
misc::easy0_32 40 (1475 MB/s) 43 (1372 MB/s) 3 7.50% x 0.93
misc::easy0_32K 40 (819875 MB/s)
@gnzlbg
gnzlbg / volatile_arch.md
Last active Jun 28, 2019
Volatile arch
View volatile_arch.md

Add the following intrinsics to core::arch::x86_64:

/// (Module documentation)
///
/// Semantics of volatile memory operations: volatile memory operations (reads and writes)
/// must be emitted by the compiler and cannot be re-ordered across other volatile operations.
/// 
/// The result of a volatile read is frozen (`freeze` is applied to it). That is,
/// reading uninitialized memory via a volatile read never returns uninitialized memory. 
@gnzlbg
gnzlbg / bfloat16.md
Last active Apr 25, 2019
concerns bfloat16
View bfloat16.md

Add f16b floating-point type for native support of bfloat16

I was asked to properly write my “concerns” here, so these are my concerns in the most constructive way I found to phrase them.

  • concern: llvm-bfloat16

This text claims that LLVM will add a native type for bfloa16. The claim is not supported in the text (e.g. no links to mailing list threads of people working or discussing this). The text should either support the claim or justify the native type in a universe where that never happens.

  • concern: unspecified-abi-issues
You can’t perform that action at this time.