Skip to content

Good News for JavaScript! Bad News for Me…

November 29, 2011

The current focus of my Ph.D. research is to build a type inference and optimization system to help better optimize JavaScript through a mix of static and dynamic analysis (I’ve been calling this “optimistic optimization”). I’ve known for a while that Brian Hackett at Mozilla is working on something similar in concept to my project. I found out a few days ago that their system is integrated in a beta version of Firefox, and that they’re getting ready to publish a paper about it. Their implementation gives Firefox a significant performance boost, which is good news for JavaScript.

This, however, is bad news for me. I knew their approach was similar to mine, but I didn’t know how much. Having taken a look at the draft version of the paper, it seems their approach is almost exactly the same as what I was going for with my research. The type analysis is extremely similar to what I started implementing. Even the terminology used to describe it is similar to what I had developed. If I didn’t know better, I would think they’ve been spying on me. Odds are it’s a pure coincidence, however. Two people, looking at the same data, came to the same conclusion as to what was the next logical step, as it’s happened many times before in history.

Unfortunately, I’m not at the stage where I’m ready to publish, and so they’re going to beat me to the punch, and get full credit for this idea first. One positive way to look at this is that it proves my own hypothesis. It’s a bit of a disillusion for me though. I view this idea as an extension of what I began working on for my M.Sc. thesis. I’ve had this idea over two years ago. I thought it would change the way dynamic language compilers are built, and that I could get my name associated with it. It seems, however, that Mozilla will be fully credited for it. Mozilla has much more manpower than I have, and so they’ve had time to implement it much faster than I could hope to.

I guess the truth is that this kind of thing occurs very frequently in academia. Many people come to the same conclusion and have similar ideas as to the direction research should take in a given field. Many math theorems have been independently co-discovered, for example. My Ph.D. advisor doesn’t seem worried. He seems to think that as long as my research is not exactly the same as Brian Hackett’s, I will be contributing something to the field. I suppose this is true, but I can’t help feeling disappointed. I was hoping to be the first to bring this idea forward. Instead, my contribution will have to be more incremental. I’m forced to face the truth that academia is obviously very competitive, and I suppose I shouldn’t have been so personally attached to this idea in the first place.

My original Ph.D. project idea was to implement optimistic optimization techniques in a custom JIT compiler I would build for a dynamic language of my own conception, which I was then planning on naming “Go”. This compiler would, as the one I had built for my M.Sc., be implemented in C++. The approach to optimization would have been two-fold: design optimizations for dynamic languages, and design my own dynamic language to be efficiently optimized. Essentially, the language would be conceived to use features I knew my techniques could optimize well, so as to maximize performance benefits. My task, for now, will be to reevaluate the direction of my research and decide what my contribution should be.

  1. Generally I find that anything one wants to program has already been done by somebody else. If not now, then certainly prior to your own release. You can never let that dismay you, otherwise you’d never bother writing anything.

    Something else I’ve discovered as well. The promised functionality and approach of said programs rarely matches what is actually released in the end — marketing rules, even between programmers. Never prematurely think somebody has beaten you.

    • Certainly someone else usually has also thought about it. I don’t plan on giving up. I’ll do my best to keep advancing the field. I’ll change the direction of my research slightly if necessary.

      I’d also like to try and make my compiler become something usable, perhaps gain some following of its own someday.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: