[Qt-interest] C++ + QT vs C#
Scott Aron Bloom
Scott.Bloom at sabgroup.com
Thu Mar 19 15:25:10 CET 2009
QT 4.4.3, Dev Studio 2005 SP1...
From: Alessandro Vanzulli [mailto:alessandro.vanzulli at gmail.com]
Sent: Thursday, March 19, 2009 4:06 AM
To: Scott Aron Bloom
Cc: qt-interest at trolltech.com
Subject: Re: [Qt-interest] C++ + QT vs C#
Hi Scott,
which version of QT are you using ???
Thanks and have a good day.
Bye
Alessandro
2009/3/19 Scott Aron Bloom <Scott.Bloom at sabgroup.com>
Hope all you QT people like my numbers.. I'm pretty proud of them.
So I've been working on a project for a client, and the previous
consultant (who had to leave the project but Im friends with) is a C#
guy... Loves C# etc etc... Claims the performance is great and that Im
full of $%#@ when I say Ill stick with C++ when and I need
performance... And even if I don't.. Ill still take C++ J
In taking over the project, essentially we had to be able to read in a
tab separated file, with a random header, and insert it into a new
table, using the first row as the field names of the database.
He wrote it in C# and had all but the insert into DB working.. Now.. I
didn't like his style (he read the whole file in at once and then used a
string splitter to split the lines...
Initially its app sat at 450MB to read in the 118k rows due to having
the whole thing in memory + each line in memory...
Well we both wrote it to be read 1 line, process 1 line, maybe a bit
slower... but not much..
C++(Console) C++(GUI) C#
Memory before loading anything 6MB 9MB
22MB
Memory after reading each line
and inserting into DB 6MB
9MB 180MB (love heap managers...)
Memory after show db in GUI
In QT using QSqlQueryModel and
QAbstractTableModel NA
12MB 450MB
Runtime to load with NO DB connection
(release mode) 3s
3s 9s
Runtime to load with DB inserts 210s
210s 540s
Runtime to show in GUI NA
.5s 3.3s
Size of data...
~118k rows of 105 columns of ~50 filled columns.
BTW.. I cant use BULK IMPORT commands because they are not SQL database
agnostic.
Scott
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090319/a385c591/attachment.html
More information about the Qt-interest-old
mailing list