en en en pt es en en en en cv az en en en en en en en en en en en en en en ja ca es en es ne en en en en en en en en en en en en en en en en en fr en zh nl en en en en en en en en en en en en en en it en en en en en en en pt en en en en en en en en en en en en en en en en
analysis, bsd, compiler, conference, dconf, dlang, drawing library, garbage collector, graphics, higgs, javascript, jit, osx, xlib
Coming Soon to OSX & BSD
While chatting in the #higgsjs chatroom, Tommy and I found out that several people had tried running Higgs on OSX systems without success. Since he and I both run Linux as our main OS, we were both unaware of the portability issues involved. The unfortunate thing is that this situation has probably been going on for months, and nobody had told us until now. It makes me a little sad to think that quite possibly, several dozen people may have tried and discarded Higgs after running into such problems. Fortunately, Paul Fryzel has generously been helping us test and debug Higgs on his Mac and we’re now pretty close to a working solution. Tommy will also be testing Higgs on BSD for good measure.
We’ve decided to add an examples directory to the Higgs repository to showcase usage of Higgs-specific libraries and language features. This currently includes a “Hello World” example for the draw library, and a simple pong game clone built for Higgs.
I’ve been spending most of my time working on a paper on Basic Block Versioning (BBV) and incremental compilation. The results so far are very encouraging. BBV is able to eliminate more type tests than a static analysis, and produces measurable improvements in running time on the benchmarks we’ve tested it on. The graph below shows some preliminary results on part of the set of benchmarks tested (lower is better):
While working on the paper, I’ve been optimizing the size and quality of the code generated by Higgs so as to improve performance. I also discovered a strange anomaly in the results. Running the static type analysis produced a very significant slowdown (over 2x) on some benchmarks, even when the results of the said analysis were not used. Simply running the analysis in the same process brought a huge performance penalty in terms of execution time, with the time taken by the analysis itself excluded from measurement.
This led me to discover that the D garbage collector, which is used by the type analysis, is very inefficient, and performs much worse when there is more data allocated. Higgs has its own heap for JS code, but sometimes needs to perform allocations when interacting with the host runtime (written in D). These allocations were much slower than I expected. With a simple change, I was able to eliminate most of them. I also decided to pre-allocate memory for the D garbage collector in order to reduce collection frequency. To my surprise, this yielded a 4x performance improvement on several benchmarks.
It seems i’ve been able to convince my PhD advisor (Marc Feeley) that the next phase of my research, after the current paper is submitted, should focus on extending basic block versioning to add object/field type analysis capabilities. In my opinion, the right way to do this is to implement a system of typed hidden classes (or shapes, as the Mozilla people call them). This should make it possible to eliminate many more type tests, and accelerate property accesses as well as method calls. As an added bonus, a proper implementation of hidden classes will provide a better foundation to efficiently implement getters and setters in Higgs.
From → Compilers, Higgs
Leave a Reply Cancel reply
Enter your comment here...
Fill in your details below or click an icon to log in:
Email (required) (Address never made public)
You are commenting using your WordPress.com account. ( Log Out /  Change )
You are commenting using your Twitter account. ( Log Out /  Change )
You are commenting using your Facebook account. ( Log Out /  Change )
Notify me of new comments via email.
Notify me of new posts via email.
« The Constness Problem
Positive Results for Higgs »
Typed vs Untyped Virtual Machines
Minimalism in Programming Language Design
Democracy, Dictatorships and Access to Information
Code that Doesn’t Rot
The Internet Changed My Life
What’s Could You Use Tesla Bot For?
NoiseCraft: a Browser-Based Visual Programming Language for Sound & Music
Art Artificial Intelligence Artificial Life Assembly Biology Compilers Creativity D Language Electronics Future Game Development Genetic Algorithms Grad studies Graphics Higgs JavaScript Microcontrollers Microprocessors Music Programming Programming Languages Psychology Rant Robotics Tachyon Technology Uncategorized work x86 Zeta
Archives Select Month June 2022  (1) May 2022  (1) March 2022  (1) February 2022  (2) January 2022  (2) December 2021  (1) June 2021  (1) February 2021  (2) December 2020  (1) September 2020  (1) January 2020  (1) November 2019  (2) October 2019  (2) June 2019  (1) January 2019  (1) December 2018  (1) May 2018  (2) February 2018  (1) January 2018  (1) December 2017  (1) October 2017  (1) June 2017  (1) April 2017  (1) January 2017  (1) December 2016  (1) November 2016  (2) September 2016  (2) May 2016  (1) March 2016  (1) February 2016  (2) January 2016  (1) November 2015  (4) October 2015  (1) September 2015  (3) August 2015  (2) July 2015  (3) June 2015  (1) May 2015  (3) April 2015  (2) March 2015  (1) February 2015  (1) December 2014  (1) November 2014  (2) October 2014  (2) September 2014  (3) July 2014  (3) May 2014  (1) April 2014  (1) March 2014  (1) February 2014  (1) January 2014  (3) December 2013  (3) October 2013  (2) September 2013  (1) August 2013  (2) July 2013  (3) June 2013  (2) May 2013  (3) March 2013  (2) February 2013  (1) January 2013  (3) December 2012  (4) November 2012  (1) October 2012  (1) September 2012  (3) July 2012  (4) June 2012  (2) May 2012  (2) April 2012  (4) March 2012  (2) February 2012  (3) January 2012  (6) December 2011  (2) November 2011  (3) October 2011  (8) September 2011  (4) August 2011  (3)