Geoff:[[BR]] artschnica data - JSC much faster on similar CPUs if we’re drawing to the screen, slightly slower for purely computational tasks[[BR]] [[BR]] pizlo:[[BR]] FTL motivation: use c-like compiler to do final optimizations[[BR]] 10-50x time spent in llvm as JSC code when compiling with FTL[[BR]] b3 goal: reduce compiling time by 5x, this would increase scores on losing benchmarks[[BR]] wrote new compiler from scratch, 10x faster compiling time than llvm[[BR]] b3 uses better instruction selector, register allocator[[BR]] llvm instruction selector uses most of its compile time[[BR]] not done yet, probably measuring data within a month[[BR]] targeting all 64-bit architectures, right now it works best on x86_64, working on arm64[[BR]] b3ir has two div instructions, chillDiv does double division then converts to int, arm div is more like chillDiv[[BR]] JSC regex engine slows down JetStream and Octane2 benchmarks[[BR]] Kraken should speed up[[BR]] llvm doesn’t do or want tail duplication optimization, which would speed up JSC[[BR]] parallel compiling with llvm has a memory bottleneck, but works ok on computers with lots of CPU cores[[BR]] Octane2 needs better garbage collection and better regex engine[[BR]] goal is to be faster than Edge on all benchmarks[[BR]] b3 - “barebones backend” - ssa “static single assignment” compiler like llvm[[BR]] air - assembly intermediate representation[[BR]] register allocation, macro assembler[[BR]] “bacon, butter, biscuit” - appetizer at a restaurant in campbell[[BR]] air probably takes more memory than b3[[BR]] b3 is lowered to air[[BR]] b3 equivalent of llvmir[[BR]] air equivalent of mc[[BR]] [[BR]] Michael: [[BR]] calling conventions! We’re going to follow a calling convention. Almost C calling convention.[[BR]] use more registers for arguments to prevent storing/loading on stack, which slows down code when calling functions[[BR]] plan to follow calling conventions so that LLINT or baseline JIT can be called from anywhere[[BR]] sometimes requires shuffling registers around so that parameters are in the correct registers[[BR]] JSC on 64-bit platforms dedicate two registers to tag values, which are in callee-saved registers and need to be pushed and popped when using llvm because llvm has different register allocation than JSC[[BR]] coalesces unnecessary mov operations[[BR]] tail call optimizations (unrelated) allow recursive functions without adding to the stack each time.[[BR]] if calling functions knows about the allocated registers in the function, it could break calling convention and do more optimizations, but if the function is recompiled, anything that calls it would need to be recompiled. — this is what inlining is for[[BR]] armv7 doesn’t have enough registers for this optimization to be useful. i386 doesn’t have any registers for calling. pizlo: If we needed this optimization enough, we could invent our own calling convention.[[BR]] pizlo: If a function is well-behaved, we should raise its inlining threshold[[BR]] profiling bug - need profiling on math[[BR]] [[BR]] rniwa: es6 slides[[BR]]