You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
was trying to compile this advent of code js for fun:
// d3/d3.1.tsvarscript="d3.1.ts";vartext="xmul(2,4)&mul[3,7]!^don't()_mul(5,5)+mul(32,64](mul(11,8)undo()?mul(8,5))";functionrun(){conststart=performance.now();constmatches=text.match(/(mul\(\d+,\d+\))/gm);letsum=0;for(leti=0;i<matches.length;i++){constmatch=matches[i];constcommaIndex=match.indexOf(",");sum+=parseInt(match.substring(4,commaIndex))*parseInt(match.substring(commaIndex+1,match.length-1));}constdiff=performance.now()-start;return{result: sum,time: diff};}console.log(script.replace(".txt","").split("\\").at(-1));var{ result, time }=run();console.log(`Result: ${result}`);console.log("Measuring...");varsumTime=0;varrunCount=1e4;for(leti=0;i<runCount;i++){construnTime=run().time;sumTime+=runTime;}console.log((sumTime/runCount).toFixed(2)+"ms per run");
tried running porf native d3.1.js d3.1.exe --no-pgo, but got the following error:
15ms parsed
157ms generated wasm
34ms optimized
33ms assembled
105ms compiled Wasm to C
/ compiling C to native (using clang)...clang: warning: argument '-Ofast' is deprecated; use '-O3 -ffast-math'for the same behavior, or '-O3' to enable only conforming optimizations [-Wdeprecated-ofast]
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
C:\Users\ALEXAN~1\AppData\Local\Temp\porffor_tmp-149634.o : fatal error LNK1107: invalid or corrupt file: cannot read at 0xAA780
clang: error: linker command failed with exit code 1107 (use -v to see invocation)
Error: Command failed: clang porffor_tmp.c -o d3.1.exe -Ofast -flto=thin -march=native -s -ffast-math -fno-exceptions -fno-ident -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections
not a big deal, but maybe a fun example to debug on!
The text was updated successfully, but these errors were encountered:
I freshly installed it with winget install LLVM and added the respective install path to my PATH. Haven't tested it with anything else. Any idea what would be good for figuring out if it works?
was trying to compile this advent of code js for fun:
tried running
porf native d3.1.js d3.1.exe --no-pgo
, but got the following error:not a big deal, but maybe a fun example to debug on!
The text was updated successfully, but these errors were encountered: