Skip to content

Instantly share code, notes, and snippets.


Kyle Spier-Swenson MrStonedOne

Block or report user

Report or block MrStonedOne

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Created Apr 16, 2016 — forked from C-F-K/TRIGGER.NTSL
trigonometry automator for telescience on /tg/station13
// TRIGGER.NTSL - trigonometry automator for telescience on /tg/station13
// this isn't accurate enough to steal DAT FUKKEN DISK exactly
// but that's the price you pay for automation.
// it is PLENTY accurate - enough to, say, teleport an EMP grenade into the cap's office
// to take out cameras, then have an accomplice teleport you in to grab the disk yourself.
// and of course with a halfway competent toxins lab it's WAY precise enough for bombs.
// use your imagination.
// iterator function
View gist:06a275be398499db41da702dde7fc518
code/controllers/subsystem/ - code/controllers/subsystem/ => 1621.765625ms (127435) (avg:0.012726218439638615)
code/controllers/subsystem/ - code/controllers/subsystem/ => 1082.953125ms (127437) (avg:0.0084979487583041191)
code/controllers/subsystem/ - code/controllers/subsystem/ => 1023.03125ms (127437) (avg:0.0080277407541871071)
code/controllers/subsystem/ - code/controllers/subsystem/ => 960ms (127437) (avg:0.0075331339612603188)
code/controllers/subsystem/ - code/controllers/subsystem/ => 858.453125ms (127437) (avg:0.0067362943664193153)
code/controllers/subsystem/ - code/controllers/subsystem/ => 824.828125ms (127436) (avg:0.0064724893309175968)
code/controllers/subsystem/ - code/controllers/subsystem/ => 806.1875ms (127435) (avg:0.0063262642361223698)
code/controllers/subsystem/ - code/controller
View packtest.cpp
#include <iostream>
#include <stdlib.h>
#include <time.h>
using namespace std;
#define ARRAY_SIZE 500000
#define ACCESS_AMOUNT 5000000
#ifdef packitbaby
#pragma pack(push, 1)
View proc overhead
#define SECONDS *10
var/end = world.timeofday+60 SECONDS
while (world.timeofday < end)
View 512.1395.procoverheadtest.byondprofile
Profile results (total time)
Proc Name Self CPU Total CPU Real Time Calls
---------------------------------------------------------- --------- --------- --------- ---------
/proc/testprocoverhead_enhanced_global_empty_return_extra 4.664 4.808 4.973 1496620
/proc/testprocoverhead_enhanced_global_empty_return 4.506 4.639 4.814 1503078
/proc/testprocoverhead_enhanced_global_empty 4.703 4.827 5.003 1496369
/proc/testprocoverhead_enhanced_global_5var_return_extra 5.780 5.927 6.087 1499840
/proc/testprocoverhead_enhanced_global_5var_return 5.690 5.841 6.027 1507978
/proc/testprocoverhead_enhanced_global_5var 5.615 5.752 5.942 1498705
MrStonedOne / Sorted.txt
Created Dec 16, 2017
compile time by proc.
View Sorted.txt
This file has been truncated, but you can view the full file.
22.1503s loading tgstation.dme
0.2957s code\modules\admin\ src.procstart: undefined var
0.1507s code\modules\research\ procstart: undefined var
0.1419s code\__DATASTRUCTURES\ src.procstart: undefined var
0.1332s code\__DATASTRUCTURES\ src.procstart: undefined var
0.1256s code\datums\ src.procstart: undefined var
0.0900s code\modules\admin\ src.procstart: undefined var
0.0884s code\modules\research\ src.procstart: undefined var
0.0834s code\modules\admin\ src.procstart: undefined var
View gist:1c4892cb2958ad17b18ad546b49c670f
Connections: Telnet @
Run Time: 17.92s
CPU Profile Report for 512testing
Status: profiling: [Total] [Average]
Proc Self CPU Time Total CPU Time Real Time Calls
MrStonedOne /
Created Feb 7, 2018
byond memory usage of lists vs datums
//run verb, give it its memory usage as it asks, be sure to wait 5 seconds from when it asks to when you enter the data. use process explorer for best results. Use dd -> ds, not direct ds run, re-launch dd between tests
#define SAMPLE_SIZE 1000000
var/startingmemory = input("memory usage (kb)") as num
var/list/lists = new (SAMPLE_SIZE)
var/listemptymemory = input("memory usage (kb)") as num
for (var/i in 1 to lists.len)
lists[i] = list()
var/listfullmemory = input("memory usage (kb)") as num
View phpbb byond forum link backend.php
View gist:2460fcf93622a90552544f756843dbc0
CREATE TABLE `tgstation13`.`ss13role_time_log` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `ckey` VARCHAR(32) NOT NULL , `job` VARCHAR(128) NOT NULL , `delta` INT NOT NULL , `datetime` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`), INDEX (`ckey`), INDEX (`job`), INDEX (`datetime`)) ENGINE = InnoDB;
CREATE TRIGGER `tgstation13`.`ss13role_timeTlogupdate`
ON `tgstation13`.`ss13role_time` FOR EACH ROW
INSERT into ss13role_time_log (ckey, job, delta) VALUES (NEW.CKEY, NEW.job, NEW.minutes-OLD.minutes);
You can’t perform that action at this time.