Skip to content

Instantly share code, notes, and snippets.

View AliceLR's full-sized avatar

Alice R. AliceLR

View GitHub Profile
#if 0
g++ -O3 -g -Wall -Wextra anticlick.cpp -oanticlick
exit 0
#endif
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <chrono>
#include <vector>
$ ./mixer.exe
Output samples: 4800000
Function: exo_mixer
0: 48000Hz <- 48000Hz, vol=256, chn=1, mode=FLAT : 22435 us
1: 48000Hz <- 48000Hz, vol=256, chn=2, mode=FLAT : 22965 us
2: 48000Hz <- 48000Hz, vol=179, chn=1, mode=FLAT : 26772 us
3: 48000Hz <- 48000Hz, vol=179, chn=2, mode=FLAT : 29794 us
4: 48000Hz <- 44100Hz, vol=256, chn=1, mode=Nearest : 28849 us
5: 48000Hz <- 44100Hz, vol=256, chn=2, mode=Nearest : 27272 us
@AliceLR
AliceLR / farutil.c
Last active October 15, 2020 09:48
Farandole Composer pattern length vs. break byte
#if 0
gcc -O3 -g -Wall -Wextra -pedantic farutil.c -o farutil
exit
#endif
// NOTE: this currently breaks on big endian machines.
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
./megazeux.exe C:/a/MegaZeux/_testcases/mzxtests/graphics video_output=glsl gl_scaling_shader=nearest window_resolution=1280,700
2.92e (draw 4 vertices + texcoord):
* speed 1: 4760
* speed 1 smzx: 4345
* logicow.mzx: 260
* abuse0.mzx: 121
initialize char vertices in C but don't send:
* speed 1: 4770
<?php
// NOTE: this code doesn't cause the segmentation fault very often, but if e.g. a large script
// is included here the crash happens more often.
if ($_GET['progress']) { var_dump(uploadprogress_get_info(strval($_GET['progress']))); die(); }
if ($_POST['UPLOAD_IDENTIFIER']) { die("it worked."); }
$uID = floor(microtime(true) * rand(0,65535));
?>