Skip to content

Instantly share code, notes, and snippets.

View terite's full-sized avatar
✈️
Good luck, we're all counting on you.

David Stensland terite

✈️
Good luck, we're all counting on you.
View GitHub Profile
@terite
terite / Program.cs
Last active January 28, 2021 20:03
SharpPcap Span<T> benchmark
using BenchmarkDotNet.Running;
using BenchmarkDotNet.Attributes;
using System;
using SharpPcap.LibPcap;
using SharpPcap;
namespace SomeProject.Benchmarks
{
public class Program
{
// @flow strict
// Flow can infer that this program isn't correct, but it shows the error
// in (what I consider) the wrong place. Annotating could move the error
// to a better place (and allow this function to be used from another
// module), but no incantation allows for this to be annotated in a way
// that preserves arity
/* Un-annotated version for your reading pleasure
function timeit(func) {
return function wrapper(...args) {
[ignore]
[include]
[libs]
[lints]
[options]

Keybase proof

I hereby claim:

  • I am terite on github.
  • I am terite (https://keybase.io/terite) on keybase.
  • I have a public key whose fingerprint is FE39 CA5D F571 2128 6232 98D0 A2D6 4AE2 1B8B E682

To claim this, I am signing this object: