Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python3
'''Sequence to sequence grammar check.
'''
from flask import Flask, jsonify, request
import math
from keras.models import Model
from keras.layers import Input, LSTM, CuDNNLSTM, Dense, Embedding, Reshape, Concatenate, Lambda, Conv1D
from keras import backend as K
import numpy as np
From a907364f7c8e1d615ed470498be4c581fc64febd Mon Sep 17 00:00:00 2001
From: Michael Bebenita <[email protected]>
Date: Fri, 3 Mar 2017 00:20:28 -0800
Subject: [PATCH] Port inspection code.
---
build/make/configure.sh | 2 +-
configure | 3 +
examples.mk | 17 ++
inspect.c | 613 ++++++++++++++++++++++++++++++++++++++++++
<html>
<body>
<script>
function sum(array) {
var num = 0;
for (var i = 0, l = array.length; i < l; i++) num += array[i];
return num;
}
Fun: $Zga: 2213
Fun: $Yga: 1840
Fun: $tha: 1336
Fun: $Efa: 741
Fun: $Hp: 615
Fun: $kp: 518
Fun: $uk: 429
Fun: $sfa: 429
Fun: $Dfa: 415
Fun: $eT: 360
Fun: $yUe: 7382
Fun: $ZSe: 7327
Fun: $wYe: 4962
Fun: $OXe: 3849
Fun: $jTe: 3601
Fun: $a0: 3245
Fun: $XZ: 3158
Fun: $y$j: 2509
Fun: $ugk: 2260
Fun: $eak: 2147

BB.wasm

Configuration Original x Lzma x Gzip X Brotli x
             | 2,312,317        | 1.000 | 554,109          | 1.000 | 768,167          | 1.000 | 642,445          | 1.000

--optimize | 1,507,749 | 0.652 | 615,700 | 1.111 | 731,866 | 0.953 | 683,691 | 1.064

AngryBots.wasm

Configuration | Original | x | Lzma | x | Gzip | X | Brotli | x

#!/usr/bin/env python
# Copyright 2016 WebAssembly Community Group participants
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
Configuration | Original | X | Lzma | X | Gzip | X
---------------- | ---------------- | ----- | ---------------- | ----- | ---------------- | -----
| 12,557,110 | 1.000 | 2,576,801 | 1.000 | 3,965,977 | 1.000
--optimize | 7,935,794 | 0.632 | 3,225,992 | 1.252 | 3,923,214 | 0.989
Time: od_copy_16x16_sse2_u window 0.966196s
Time: od_copy_16x16_sse2_u2 window 1.060484s
Time: od_copy_16x16_c window 1.683832s
Time: od_copy_16x16_sse2_u fixed 0.903182s
Time: od_copy_16x16_sse2_u2 fixed 0.889089s
Time: od_copy_16x16_sse2_a fixed 0.881380s
Time: od_copy_16x16_c fixed 1.660509s
Time: od_copy_16x16_sse2_u window 1.407520s
Time: od_copy_16x16_sse2_u2 window 1.347348s
Time: od_copy_16x16_c window 2.027414s
Time: od_copy_16x16_sse2_u fixed 1.113882s
Time: od_copy_16x16_sse2_u2 fixed 1.108507s
Time: od_copy_16x16_sse2_a fixed 1.116045s
Time: od_copy_16x16_c fixed 2.044196s