Skip to content

Instantly share code, notes, and snippets.

View zz85's full-sized avatar

Joshua Koo zz85

View GitHub Profile
@lastmjs
lastmjs / gist:d058b2c8133b1cf45262883b3429b1be
Last active June 15, 2024 00:45
Boa/QuickJS Benchmarks Comparison
This compares Boa and QuickJS against these benchmarks: https://bellard.org/quickjs/bench.html
From these numbers we have evidence to believe that Azle's performance can be improved ~28x by switching to QuickJS.
We also have evidence from https://bellard.org/quickjs/bench.html that QuickJS could be improved up to 2x without compilation/JIT, and that compiled languages have one order of magnitude improvement over interpreted languages.
Boa:
target/release/boa combined.js
PROGRESS Richards
const src = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAAHCAAAAABmCOEJAAAACXBIWXMAAAsTAAALEwEAmpwYAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9/NocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0A/hXhEVkb2i4aJfxCaJG4lfkaiQlJM8JpUvLS19QqZMVl32llyfvIv8H4WtioVKekpvldeqFKiaqP5UO6jepRGqqaT5QeuA9iSdVF0rPUG9V/pHDBYY1hrFGNuayJsym740u2C+02KJ5QSrOutcmzjbQDtXe2sHY0cdJzVnJRcFV3k3BXdlD3VPXS8Tbxsfd99gvwT//ID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9xWbtvveW
@Lekensteyn
Lekensteyn / inject-tls-secrets.py
Last active April 30, 2024 10:40
Extracts a subset of TLS secrets and injects them in an existing capture file (requires Wireshark 3.0).
#!/usr/bin/env python3
# Extracts a subset of TLS secrets and injects them in an existing capture file.
#
# Author: Peter Wu <peter@lekensteyn.nl>
import argparse
import os
import shlex
import subprocess
import sys
@zz85
zz85 / README
Last active August 31, 2018 07:00
OSX Terminal Shortcuts (/Working with Long Terminal Commands)
Movements
Esc - F (Forward a word)
Esc - B (Back a word)
Ctrl - A (Start of line)
Ctrl - E (End of line)
Ctrl - F (Next line)
Ctrl - B (Previous line)
Deletions

1:1 questions

Always end with an assignment

What can I hold you accountable for next time we talk?

What can I be accountable to you for the next time we talk?

Short term

How is [project] going? What could we do to make it better?

Is there anything blocking you from getting your work done?

Are there any projects you’d really like to work on if you were given the opportunity?

@zz85
zz85 / test.html
Last active June 21, 2016 01:51
Game API
<html>
<body>
<style>
body {
font-family: 'monospace';
font-size: 12px;
}
</style>
Hello Copter World!
<div id="debug"></div>
@zz85
zz85 / mesh_simplify.html
Last active November 7, 2023 02:10
Fast Quadric Mesh Simplification JS port
<!DOCTYPE html>
<html lang="en">
<head>
<title>three.js webgl - modifier - Fast Quadric Mesh Simplification</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
font-family: Monospace;
background-color: #f0f0f0;
@p01
p01 / live-coding-at-SG.html
Last active November 26, 2015 22:48
Live coding at Creative Coding Singapore
<style>
#b {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient(circle, #000, #123);
}
@LeaVerou
LeaVerou / RAINBOWlog.js
Created March 12, 2014 23:30
AWESOMEify your console.log()ing! Because life is too short to be black & white!!!!!!1111one
(function(){
var log = console.log;
console.log = function(str) {
var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold;';
var args = Array.prototype.slice.call(arguments);
args[0] = '%c' + args[0];
args.splice(1,0,css);
return log.apply(console, args);
}