Skip to content

Instantly share code, notes, and snippets.

View Edorka's full-sized avatar
🏠
Working from home

Eduardo Orive Vinuesa Edorka

🏠
Working from home
  • bequant
  • Madrid
View GitHub Profile
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@Edorka
Edorka / performance-test.js
Created November 19, 2019 12:08
Testing constact vs attribute access performance
const range = n => Array.from(Array(n).keys());
function caseA() {
const parentObject = { myObject: { items: range(500000) } };
let hrstart = process.hrtime();
let counter = 0;
for (let i = 0, len = parentObject.myObject.items.length; i < len; i++) {
counter += parentObject.myObject.items[i];
}
console.log("caseA total", counter);
@Edorka
Edorka / championship.json
Last active July 16, 2018 20:22
Sample Championshu data
{"categories": [
{"id": 1,"style":"Chang Quan","division":"Sr. Male"},
{"id": 2,"style":"Chang Quan","division":"Sr. Female"},
{"id": 3,"style":"Chang Quan","division":"Jr. Mixed"},
{"id": 4,"style":"Nan Quan","division":"Sr. Male"},
{"id": 5,"style":"Nan Quan","division":"Sr. Female"},
{"id": 6,"style":"Nan Quan","division":"Jr. Mixed"}
]}