Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Eduardo Rafael EduardoRFS

🎯
Focusing
View GitHub Profile
View encode_gadt.ml
type _ ty = Int_t : int ty | List_t : 'a ty -> 'a list ty
type ex_ty = Ex_ty : _ ty -> ex_ty
type ex_value = Ex_value : 'a ty * 'a -> ex_value
let rec encode_ty : type a. a ty -> string = function
| Int_t -> "Int_t"
| List_t ty -> Format.sprintf "List_t(%s)" (encode_ty ty)
View Parallel_select_engine.re
open Lwt_engine;
[@ocaml.warning "-3"];
module Lwt_sequence = Lwt_sequence;
[@ocaml.warning "+3"];
module Fd_map =
Map.Make({
type t = Unix.file_descr;
let compare = compare;
View comparision.md

classic #80b73273ea57389062303c3325a67eaf9298800c

Estimated testing time 30s (3 benchmarks x 10s). Change using '-quota'.
┌───────────────────┬────────────┬──────────┬────────────┬────────────┬────────────┐
│ Name              │   Time/Run │  mWd/Run │   mjWd/Run │   Prom/Run │ Percentage │
├───────────────────┼────────────┼──────────┼────────────┼────────────┼────────────┤
│ FA1.2_Approve     │    11.85us │   6.49kw │      8.06w │      8.06w │      1.03% │
│ FA1.2_Transfer    │    18.47us │  10.41kw │     11.01w │     11.01w │      1.60% │
│ Dexter_xtzToToken │ 1_151.07us │ 619.98kw │ 11_152.26w │ 11_152.26w │    100.00% │
View serialize.typed_ir.ml
open Alpha_context
open Script_typed_ir
let rec serialize_stack_prefix_preservation_witness :
type b a b_s b_a.
(b, a, b_s, b_a) stack_prefix_preservation_witness -> string = function
| Prefix next ->
Format.sprintf
"(Prefix (%s))"
(serialize_stack_prefix_preservation_witness next)
View multicore.json
{
"name": "minecraft-bizarre-adventures",
"esy": {
"build": "dune build -p minecraft-ml",
"install": "esy-installer minecraft-ml.install"
},
"scripts": {
"start": "esy x minecraft-ml"
},
"dependencies": {
View my.dcps.changes.ml
(* the test below was run using flambda + profile=release *)
(*
v: 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
v: 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
v: 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
v: 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
v: 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
Estimated testing time 50s (5 benchmarks x 10s). Change using '-quota'.
┌──────────┬──────────┬─────────┬──────────┬──────────┬────────────┐
│ Name
View weird.results.re
// include Example;
// include DCPS;
module DCPS = {
type instr('b, 'a) =
| Add(instr((int, 'rest), 'a)): instr((int, (int, 'rest)), 'a)
| Sub(instr((int, 'rest), 'a)): instr((int, (int, 'rest)), 'a)
| Gt(instr((bool, 'rest), 'a)): instr((int, (int, 'rest)), 'a)
| If(instr('bef, 'aft), instr('bef, 'aft)): instr((bool, 'bef), 'aft)
| Halt: instr('b, 'b);
View input.lsp.txt
Content-Length: 2902
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":0,"clientInfo":{"name":"vscode","version":"1.51.0-insider"},"rootPath":"/","rootUri":"file:///","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional"},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]}},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true
View becnhmark.michelson.md

Setup

  • Ryzen 9 3950x
  • 16gb DDR4 3200mhz

complete pipeline, fa1.2 and detexter

classic

View fact.michelson
{ parameter int ;
storage int ;
code { PUSH int 1 ;
SWAP ;
CAR ;
PAIR ;
LEFT int ;
LOOP_LEFT
{ DUP ;
CAR ;