[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] async shader compiliation



P.S.

I've built an optimizing brainfuck compiler that does not adhere to cdecls and conventional use of C++ registers/constructs and the output is quite a bit smaller than compiling brainfuck to C++ and compiling C++ to x86.

On Tue, Mar 7, 2017 at 9:24 PM, Florian Bösch <pyalot@gmail.com> wrote:
On Tue, Mar 7, 2017 at 9:18 PM, Floh <floooh@gmail.com> wrote:
That's not really the fault of the programming language, but of the
engine design. UE4 (and similar 'traditional' game engines) are huge
million-line codebases which haven't been designed for a small
executable size. It is possible to create full 3D MMO clients at a
fraction of the size (0.5..2 MBytes), the whole code base just needs
to be designed from the ground up for a small size, unnecessary engine
features must not be included in the build, and the compiler needs to
be able to perform aggressive dead code elimination (e.g. minimal use
of dynamic-dispatch/runtime-polymorphism).
It's difficult to write maintainable idiosyncratic C++ that doesn't end up using all those code-producing features and hard to eliminate dead code paths. That's what I mean by better programming language. Plus emscripten itself being tasked with translating C++ to an alien bytecode format has to tack on quite a bit of overhead you only really need if you do C/C++ code generation, which is inherently built to output homungous code to a local filesystem geared towards x86/64.