This is a follow-up of my previous post. Here I change the table to several charts. Hope it seems more friendly to readers. You can find the links to these libraries in that table. Their source codes, including my testing code, are available here. You may also want to see my previous posts in the [...]
Posts Tagged ‘cpp’
Another Look at my old Benchmark
Posted in development, tagged benchmark, C, cpp, myprog, programming on October 7, 2008 | 24 Comments »
Futher Discussion on Search Trees
Posted in development, tagged benchmark, C, cpp, myprog, programming on September 28, 2008 | Leave a Comment »
Over the weekend, I have done a more comprehensive benchmark of various libraries on search trees. Two AVL, seven red-black tree, one Splay tree, two treap implementations are involved, together with seven hash table libraries. As I need to present a big table, I have to write it in a free-style HTML page. You can [...]
Thoughts on Generic Programming in C
Posted in development, tagged C, cpp, programming, thinking on September 21, 2008 | 1 Comment »
I came across two interviews (here and here) of Alexander Stepanov, the father of STL. There are quite a lot of interesting bits. For example, he thinks C++ is the best programming language to realize his goal, but he is also strongly against OOP at the same time. In addition, he has paid a lot [...]
C Array vs. C++ Vector
Posted in development, tagged benchmark, C, cpp on September 19, 2008 | 11 Comments »
Here is a piece of source codes that compare C arrays and C++ vectors. It tests six scenarios: a) preallocated C array; b) dynamically growing C array; c) dynamical C vector calling kv_a macro (in my kvec.h); d) dynamical C vector calling kv_push macro (in my kvec.h); e) preallocated C++ vector and f) dynamically growing C++ [...]
Comparison of Hash Table Libraries
Posted in development, tagged benchmark, C, cpp, hash, myprog, programming on August 28, 2008 | 25 Comments »
As a Perl programmer, I enjoy a lot using hash tables. I keep this habit in C/C++ programming. Then what C/C++ hash libraries are available? How are they compared to each other? In this post, I will give a brief review of hash libraries and present a small benchmark showing their practical performance.
Hash table libraries
In [...]
Comparison of Internal Sorting Algorithms
Posted in development, tagged algorithm, benchmark, cpp, myprog, programming on August 28, 2008 | 2 Comments »
Sorting algorithm
Given an array of size N, sorting can be done in O(N log(N)) in average. The most frequently used sorting algorithms that can achieve this time complexity are quicksort, heapsort and mergesort. They usually require O(log(N)), O(1) and O(N) working space, respectively (the space complexity of mergesort can be improved at the cost of [...]
C++ Reduces Coding Time?
Posted in thinking, tagged C, cpp, language-war, programming, thinking on August 27, 2008 | 1 Comment »
Just now I got an email from a mailing list, saying that C++ helps to greatly reduce coding time in comparison to C. I have heard a lot about this argument. But is that true?
C++ can possibly accelerate development in two ways: firstly, OOP (Object-Oriented Programming) helps to organize large projects, and secondly, STL (Standard [...]
Derivative-Free Optimization (DFO)
Posted in research, tagged cpp, mathematics, myprog, programming on August 24, 2008 | Leave a Comment »
You can find good subroutines in GSL for multivariable nonlinear optimization, but the only method it provides for DFO is Nelder-Mead simplex method, which, claimed by Numerical Recipes, is “almost surely” slower than the Powell’s direct set method “in all likely applications”. You can find some DFO solvers here, but few of them are implemented [...]
C++ iostream can be Slooow…
Posted in development, tagged C, cpp, programming on August 20, 2008 | Leave a Comment »
A colleague of mine just told me that C++ iostream is typically an order of magnitude slower than printf. His example shows that printing out a string like “%s\t%d\tabc\t%s\t%s\n” with C++ iostream is 3 times slower than printf in Perl! This observation agrees my experience, although I have never done any benchmark. I abandoned iostream [...]