Given an arbitrarily large sorted, balanced binary tree of values, the obvious way to search for elements is binary search. In undergraduate classes I learned that a binary search requires log(n) operations and is thus as efficient as you can get without throwing additional storage space at the problem. One thing my lecturer didn't dive into though was the effect of CPU cache on this otherwise simple little log(n) algorithm.
Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts
Sunday, 29 April 2012
Thursday, 15 April 2010
A comparison of IPC methods for Mac OSX
For a project I'm working on, I needed to transfer 6 600x300@30fps video feeds from one process to potentially 6 others. Thats around 31MB/sec. It had to be fast as other processing, compression and decompression was also required simultaneously.
A survey of various IPC techniques was in order and I was surprised I couldn't find any similar comparisons on the web. I spent about a day running through various options and benchmarking my results in a not-so-rigorous-but-still-quite-useful way. I figured I'd post my results here in the hopes it saves someone a bit of time.
A survey of various IPC techniques was in order and I was surprised I couldn't find any similar comparisons on the web. I spent about a day running through various options and benchmarking my results in a not-so-rigorous-but-still-quite-useful way. I figured I'd post my results here in the hopes it saves someone a bit of time.
Saturday, 21 November 2009
MSVC++ Debug Output
I've been working on a multi-threaded Audio / Video / Network based browser plug-in recently and had a few threading-related synchronization issues to deal with. Break-points in multi-threaded apps are all well and good but when you have synchronisation issues that can potentially cause a browser crash, either a file-based logger or, preferably in my case, an IDE-based log of what happened is invaluable.
I've been a big GCC/G++ user for quite some time and haven't touched MSVC in a while so I was suprised when I had a lot of trouble tracking down the function used to output Debug information to the MSVC Output console so I thought I'd post it here to help out anyone with similar problems.
The functions you want are OutputDebugStringA or OutputDebugStringW. They're in winbase.h, included from windows.h. Their use is self explanatory.
I've been a big GCC/G++ user for quite some time and haven't touched MSVC in a while so I was suprised when I had a lot of trouble tracking down the function used to output Debug information to the MSVC Output console so I thought I'd post it here to help out anyone with similar problems.
The functions you want are OutputDebugStringA or OutputDebugStringW. They're in winbase.h, included from windows.h. Their use is self explanatory.
Wednesday, 4 November 2009
Information that is missing from the Adobe RTMP Specification
I've been implementing an RTMP client and server library for the past few months and assumed that if I stuck to the official specifications I couldn't go wrong. Unfortunately though the specs are a little lacking in parts. To save anyone else the mistakes I have made, heres a few pointers.
Wednesday, 28 October 2009
Obtain CSS3 compliance using JQuery? Not anytime soon.
@pukupi and @juho asked me whether it would be possible to style CSS3-compliant border-radius styles using a framework like jquery. I did a bit of digging around and discovered that the answer is unfortunately "no, you can't".
Wednesday, 16 September 2009
ffmpeg and mingw
I love ffmpeg and all it stands for. It has developed into an amazing library with support for an incredible array of file formats, codecs and protocols. It's widely known, widely used and despite its complex options, a wide variety of front-end apps make working with it a lot easier for the layman.
For developers however, ffmpeg has a few stumbling blocks that tend to get in the way. I'm no expert by any means but I thought I'd share a few things I ran into while integrating ffmpeg into a browser plugin I've been working on.
For developers however, ffmpeg has a few stumbling blocks that tend to get in the way. I'm no expert by any means but I thought I'd share a few things I ran into while integrating ffmpeg into a browser plugin I've been working on.
Thursday, 27 August 2009
Is Adobe holding back Flashplayer features for strategic business reasons?
I originally posted this via the Adobe Bug site and tried to contact Adobe in May 2009. I got no response but this is still quite relevant.
Being arguably the most requested feature on Adobe's own bug tracking site and already present in an internal fork of Flashplayer, Adobe has so-far dodged all questions regarding this. I'm now mid-development on an alternative browser plugin to make up for these short comings. (More on that in weeks to come.)
Subscribe to:
Posts (Atom)