Skip to content

Instantly share code, notes, and snippets.

View MihaZupan's full-sized avatar
🍉
Genocide = bad

Miha Zupan MihaZupan

🍉
Genocide = bad
View GitHub Profile
@gfoidl
gfoidl / Vector_Reduce_Min_Max.cs
Last active August 23, 2023 19:08
ReduceMin/Max for Vector128<T> where T : IBinaryInteger
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;
internal static class VectorExtensions
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static T ReduceMin<T>(this Vector128<T> vector) where T : struct, IBinaryInteger<T>
{
@EgorBo
EgorBo / jit-diffs for changes in C# code.md
Last active January 16, 2023 18:29
jit-diffs for changes in C# code.md

How to run jit-diffs for changes in the managed code

All commands are in powershell, should be pretty much the same for bash and non-windows platforms

  1. build everything we're going to need:
.\build.cmd Clr+Libs -c Release ;; .\build.cmd Clr -c Checked ;; cd .\src\tests\ ;; .\build.cmd Release generatelayoutonly ;; cd ..\..
  1. Make a copy of the test core_root (will be a baseline):
@mort3za
mort3za / git-auto-sign-commits.sh
Last active May 28, 2024 20:51
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)