Jump to content

  • Log In with Google      Sign In   
  • Create Account

The Bag of Holding

Cleaning Up Garbage

Posted by ApochPiQ, 01 January 2014 · 608 views
Earlier today I decided to go ahead and turn the garbage collector back on, and see just how bad things are.

On the plus side, the compiler still self-hosts in only a few seconds, so it's not nearly as horrid as it could be.

On the down side, there's a persistent crash deep in the garbage collector that seems to be related to getting invalid stack infor...

Death to 2013

Posted by ApochPiQ, 31 December 2013 · 566 views
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 make the compiler as fast as it's gotten.

Along the way,...

Drink Your Ovaltine, Kiddies

Posted by ApochPiQ, 29 December 2013 · 564 views
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 to most programmers, especially not games programmers,...

Still Addicted to Speed (no, not that kind)

Posted by ApochPiQ, 27 December 2013 · 585 views
Epoch, language design
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 milliseconds, which isn't terrible, but isn't what I want either...

Return to Fast-Land

Posted by ApochPiQ, 22 December 2013 · 609 views
Epoch, language design
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 compiler that led to the slowness. The only data struct...

What's Next for Epoch?

Posted by ApochPiQ, 19 December 2013 · 495 views
Epoch, language design
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 slow, so much so that I turned it off entirely in ord...

Self-hosting the Epoch Compiler: Day Six

Posted by ApochPiQ, 15 December 2013 · 729 views
Epoch, language design
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 fix it.

A couple of false starts later, things were lo...

Self-hosting the Epoch Compiler: Day Five

Posted by ApochPiQ, 14 December 2013 · 401 views
Epoch, language design
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 original compiler's logic and try to replicate it more exa...

Self-hosting the Epoch Compiler: Day Four

Posted by ApochPiQ, 13 December 2013 · 420 views
Epoch, language design
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 program into LLVM bitcode (for eventual translation to machin...

Self-hosting the Epoch Compiler: Day Three

Posted by ApochPiQ, 12 December 2013 · 561 views
Epoch, language design
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 its first semantic analysis on itself, and began attemptin...

December 2014 »

21 22 2324252627

Recent Entries

Recent Comments