C vs Swift: Reprise

Upgrading the Swift 1.2 version of the orbitals project brought some new performance challenges. I revisit a post by David Steuber, which benchmarked C and Swift generating a 2880x2880 pixel Mandelbrot with 4000 iterations per pixel. C killed Swift. ...

May 12, 2016 · 2 min

Perspective: Relative computing power

A brief exploration how far computing has come by comparing a Cray 1 supercomputer with an iPhone 6 ...

Sep 10, 2015 · 1 min

lldb: VI mode and tab-completion

lldb uses libedit, which is a BSD licensed alternative to GNU readline. A feature of libedit is the ability to configure per-application settings for command-line bindings via ~/.editrc. Detailed documentation for this configuration file can be found using man editrc or via online documentation, such as developer.apple.com. As I prefer VI bindings, I initially configured my .editrc as follows, to replace the default emacs bindings: lldb:bind -v Unfortunately, when I re-ran lldb, tab-completion was not functioning. I added the following line, which is exported in libedit, and what I assumed would be the default completer function: ...

Jun 23, 2012 · 2 min

llvm / Clang hacking: Part 3

Part 3 in my N-part series on my exploration of hacking on llvm and Clang (c-language) tool chain. Prerequisites This post assumes you’ve successfully completed Part 1 and Part 2 of the series. I’m also going to assume if you’re interested in hacking on Clang, you have an understanding of compilation and are familiar with terms such as lexing, parsing, syntactic analysis, semantic analysis and code generation. If not, then you need to purchase a copy of Compilers: Principals, Techniques and Tools, also known as the Dragon Book and read through it. There are also plenty of resources on Google. ...

Jun 6, 2012 · 6 min

llvm / Clang hacking: Part 2

Part 2 in my N-part series on my exploration of hacking on llvm and Clang (c-language) tool chain. Prerequisites This post assumes you’ve successfully completed Part 1 of the series. Debugging By default, Clang presents a gcc-compatible command-line interface. In most circumstances, this allows Clang to be a drop-in replacement for gcc for rapid testing and easier adoption. When using the gcc interface, Clang spawns a new job to handle the compilation, which prevents debugging the various stages of the compilation process. You can see this by running the following command: ...

Jun 6, 2012 · 2 min