![Death to 2013](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
This time last year, I was obsessing over putting the finishing touches on the Epoch realtime raytracing demo. The emphasis then was on runtime speed, much like the recent focus has been on compilation speed. I think it's fitting that the work on runtime speed directly contributed to the ability to…
![Drink Your Ovaltine, Kiddies](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
There is a special trick to optimizing code, one that I usually drag out as a weapon of last resort when all algorithmic stuff is taken care of and it's time to give up or start trying to micro-optimize.
The secret, of course, is to eliminate dynamic memory allocations. This isn't a huge revelation …
The secret, of course, is to eliminate dynamic memory allocations. This isn't a huge revelation …
![Still Addicted to Speed (no, not that kind)](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
Over the past few days I've managed to hit what seems to be a local minimum in the compiler's speed: 1.1 seconds. Of course, this is slightly inflated, because the compiler is now substantially larger than it was before. If I do a pure apples-to-apples comparison, the compiler hits about 850 millis…
![Return to Fast-Land](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
A few days ago, the Epoch compiler could self-host in about 60 seconds.
My last run of the self-hosting process clocked in at 6.59 seconds - nearly ten times faster than when I started out. That's not bad for a couple afternoons worth of work.
As I suspected, there was a lot of lazy nonsense in the c…
My last run of the self-hosting process clocked in at 6.59 seconds - nearly ten times faster than when I started out. That's not bad for a couple afternoons worth of work.
As I suspected, there was a lot of lazy nonsense in the c…
![What's Next for Epoch?](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
As I wrote up in the previous several entries, the Epoch programming language recently achieved self-hosting. I've had a few people ask what happens next, so I figured I'd write up my plans for Epoch's immediate future.
First and foremost, I need to fix the garbage collector. It's currently stupidly…
First and foremost, I need to fix the garbage collector. It's currently stupidly…
![Self-hosting the Epoch Compiler: Day Six](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
Tackling problems with a fresh mind makes a world of difference.
The first thing I needed to solve this morning was a miscompile involving constructors. Deeper investigation showed that sum-typed members were to blame. Thankfully, this bug had an easy repro, so I built out a test case and set out to…
The first thing I needed to solve this morning was a miscompile involving constructors. Deeper investigation showed that sum-typed members were to blame. Thankfully, this bug had an easy repro, so I built out a test case and set out to…
![Self-hosting the Epoch Compiler: Day Five](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
After a nice night of rest, it's time to come back in force and really hammer on this compiler.
The first bug I decided to tackle involved incorrect type annotations when passing sum-typed variables to a pattern matched function (say that ten times fast). The fix was to look more carefully at the or…
The first bug I decided to tackle involved incorrect type annotations when passing sum-typed variables to a pattern matched function (say that ten times fast). The fix was to look more carefully at the or…
![Self-hosting the Epoch Compiler: Day Four](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
Mostly hammering away on a variety of miscompiles and other tiny bugs tonight; I've squished a ton of problems but they all blur together and I can't clearly remember what all they were.
Almost everything at this stage manifests as the JIT engine vomiting when trying to turn the compiled Epoch progr…
Almost everything at this stage manifests as the JIT engine vomiting when trying to turn the compiled Epoch progr…
![Self-hosting the Epoch Compiler: Day Three](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
Sat down and figured out some of the annoying bugs that were left in the compiler, mostly surrounding higher order functions and templates. Rigged up a half-dozen more intrinsics and such, and fired off the compiler for yet another pass on itself.
At 8:02PM PST the compiler successfully completed it…
At 8:02PM PST the compiler successfully completed it…
![Self-hosting the Epoch Compiler: Day Two](https://uploads.gamedev.net/monthly_2017_06/321649.thumb.png.c7e3a9cb02b37a485d4cf9b8c638b8e7.png)
A large number of the errors emitted by attempting to self-host the compiler have turned out to be caused by a relatively small number of bugs.
Hex literals had no support at all in the compiler, so I added that, and crushed a bunch of errors. I forgot to special-case 0 so anything that evaluated to…
Hex literals had no support at all in the compiler, so I added that, and crushed a bunch of errors. I forgot to special-case 0 so anything that evaluated to…
Advertisement
Popular Blogs
Advertisement