Skip to content

Instantly share code, notes, and snippets.

View bench-js.org

Timing

BenchTileBuilder

  • using current bubble-wrap-style.zip and tile.mvt from our benchmarks
./bench/benchTileBuilder.out --benchmark_repetitions=4

NoJS

All JS functions replaced with some default values that should also build the same set of features - so by sight this should be the baseline:

-----------------------------------------------------------------------------------------
View export.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View scene.yaml
global:
feature_order: function () { return feature.sort_rank | 0; }
fonts:
Montserrat:
url: https://fonts.gstatic.com/s/montserrat/v7/zhcz-_WihjSQC0oHJ9TCYL3hpw3pgy2gAi-Ip7WPMi0.woff
Open Sans:
- weight: 400
url: https://fonts.gstatic.com/s/opensans/v13/wMws1cEtxWZc6AZZIpiqWALUuEpTyoUstqEm5AMlJo4.woff
- weight: 400
View gist:f06f6359d6ba240669ce85a359bfe682
TANGRAM shaderProgram.cpp:145: >>> VERTEX {style:heightglowline}
#define TANGRAM_EPSILON 0.00001
#define TANGRAM_WORLD_POSITION_WRAP 100000.
#define TANGRAM_DEPTH_DELTA 0.000031
#define TANGRAM_VERTEX_SHADER
#pragma tangram: extensions
#ifdef GL_ES
precision highp float;
#endif
#pragma tangram: defines
View links.sql
View osmagrain.yaml
cameras:
perspective:
type: perspective
vanishing_point: [0, -500]
lights:
directional1:
type: directional
direction: [.5, .1, -1]
diffuse: .4
ambient: 0.6
View variadic.cpp
/*
clang++-3.6 -DVARIADIC_WRAPPER -O3 -Wall -Wpedantic -std=c++11 variadic.cpp
./a.out
objdump -j .rodata -j .text -d -S a.out > a.txt
clang++-3.6 -O3 -Wall -Wpedantic -std=c++11 variadic.cpp
./a.out
objdump -j .rodata -j .text -d -S a.out > b.txt
View gist:60b43c9749a80d6544a7
/*
clang++-3.6 -DVARIADIC_WRAPPER -O3 -Wall -Wpedantic -std=c++11 variadic.cpp
./a.out
objdump -j .rodata -j .text -d -S a.out > a.txt
clang++-3.6 -O3 -Wall -Wpedantic -std=c++11 variadic.cpp
./a.out
objdump -j .rodata -j .text -d -S a.out > b.txt
View README.md

mkatlas

[BASH][1] script to build a [texture atlas][2] for small/medium web sites/games. Requires [ImageMagick][3].

Usage

Basic

View gist:0e09da59b7af91de877e
@@ -14,10 +14,12 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.oscim.android.canvas;
+import static android.graphics.Bitmap.Config.ARGB_8888;
+
import java.io.InputStream;