Skip to content

Instantly share code, notes, and snippets.

@BlueCocoa
BlueCocoa / cpu-test1.txt
Last active November 22, 2020 02:39
ncnn benchmark on Apple Silicon M1
$ ./benchmark/benchncnn
thread_policy_set error 46
loop_count = 4
num_threads = 8
powersave = 0
gpu_device = -1
cooling_down = 1
squeezenet min = 5.64 max = 6.24 avg = 5.88
squeezenet_int8 min = 8.93 max = 8.97 avg = 8.94
mobilenet min = 8.86 max = 8.99 avg = 8.91
Model Image Size Target Size Block Size Total Time(sec) GPU Memory(MB)
models-cunet 200x200 400x400 400/200/100 0.93/0.30/0.33 615/615/173
models-cunet 400x400 800x800 400/200/100 0.78/0.71/0.78 2408/615/174
models-cunet 1000x1000 2000x2000 400/200/100 3.16/3.21/3.53 2416/618/175
models-cunet 2000x2000 4000x4000 400/200/100 11.40/11.98/13.86 2420/669/193
models-cunet 4000x4000 8000x8000 400/200/100 44.33/47.15/54.76 2452/644/197
models-upconv_7_anime_style_art_rgb 200x200 400x400 400/200/100 0.16/0.16/0.15 459/459/119
models-upconv_7_anime_style_art_rgb 400x400 800x800 400/200/100 0.43/0.37/0.37 1741/460/119
models-upconv_7_anime_style_art_rgb 1000x1000 2000x2000 400/200/100 1.62/1.59/1.67 1764/462/120
@BlueCocoa
BlueCocoa / bilink.p6
Created December 14, 2016 02:48
Get bilibili download links in Perl6

Keybase proof

I hereby claim:

  • I am BlueCocoa on github.
  • I am 0xbbc (https://keybase.io/0xbbc) on keybase.
  • I have a public key whose fingerprint is 07C0 639F C897 A625 D8B3 C443 F325 6FBF 714B 24D8

To claim this, I am signing this object:

@BlueCocoa
BlueCocoa / ios_storage.m
Created May 9, 2015 10:22
Get iOS storage size
@import Darwin.sys.mount;
int main(int argc, const char * agrv[]) {
struct statfs buf;
long long freespace = 0;
if(statfs("/", &buf) >= 0){
freespace = (long long)buf.f_bsize * buf.f_blocks;
}
if(statfs("/private/var", &buf) >= 0){
freespace += (long long)buf.f_bsize * buf.f_blocks;