From: Yuriy Koblents-Mishke (yurakm_at_[hidden])
Date: 2007-03-15 13:11:35
On 3/15/07, Jeff Garland <jeff_at_[hidden]> wrote:
> Thorsten Ottosen wrote:
> > Choosing C++ for a projects where databases are involved is probably
> > rare and Java/C#/Python/Ruby is more likely. C++ doesn't exactly
> Wow, I couldn't disagree more. Thousands of projects use C++ for database
> access. And even now, there are projects for which a tightly written db
> access core in C++ performs better than scripted or Java equivalent. Now I'll
> be the first to admit the lack of good modern libraries and tools for C++
> database mapping doesn't make C++ the first choice -- in fact it hinders the
> adoption of C++ greatly. But if your application is already in C++ you really
> shouldn't be 'punished' by not having good db access tools and libraries.
> > boost productivity, so it has to offer something else to be a condidate.
> > And what can C++ offer? Type safety.
> Raw, unadulterated speed.
I measured a timing of my recent Python & MySQL & file I/O
application. It involved a lot of sequential file I/O
read/verify/reformat/output, a lot of regexp parsing of the data, and
not really much DB access (gulped several dictionaries from MySQL
during startup, the biggest one with 0.5 millions rows). With
substantial amount of data to process the program was somewhat slow. I
thought that it spends most of time in regexp parsing and looked if it
would make sense to rewrite the codes in C++.
Turned to be that it ate roughly 15 seconds of CPU time during 15
minutes runs. Personally, I dropped the idea to rewrite it in C++ for
its "raw, unadulterated speed" after the measurements...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk