Tag Archives: Computing

Computer Algorithms: Data Compression with Relative Encoding

Overview Relative encoding is another data compression algorithm. While run-length encoding, bitmap encoding and diagram and pattern substitution were trying to reduce repeating data, with relative encoding the goal is a bit different. Indeed run-length encoding was searching for long … Continue reading

Posted in algorithms | Tagged , , , , , , , , , , , , , , , , , | Leave a comment

JavaScript Performance: for vs. while

JavaScript Loops If you have read some preformance tests on JavaScript loops, you may have heard that “while” is faster than “for”. However the question is how faster is “while”? Here are some results, but first let’s take a look … Continue reading

Posted in javascript | Tagged , , , , , , , , , , | 3 Comments

Computer Algorithms: Data Compression with Diagram Encoding and Pattern Substitution

Overview Two variants of run-length encoding are the diagram encoding and the pattern substitution algorithms. The diagram encoding is actually a very simple algorithm. Unlike run-length encoding, where the input stream must consists of many repeating elements, as “aaaaaaaa” for … Continue reading

Posted in algorithms, PHP | Tagged , , , , , , , , , , , , , , | Leave a comment

Computer Algorithms: Data Compression with Bitmaps

Overview In my previous post we saw how to compress data consisting of very long runs of repeating elements. This type of compression is known as “run-length encoding” and can be very handy when transferring data with no loss. The … Continue reading

Posted in algorithms, PHP | Tagged , , , , , , , , , , , , , , , | Leave a comment

Computer Algorithms: Linear Search in Sorted Lists

Overview The expression “linear search in sorted lists” itself sounds strange. Why should we use this algorithm for sorted lists when there are lots of other algorithms that are far more effective? As I mentioned in my previous post the … Continue reading

Posted in algorithms, PHP | Tagged , , , , , , , , , , , , , | Leave a comment