Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.
authorRobin Burchell <robin+qt@viroteck.net>
Fri, 6 Apr 2012 14:34:19 +0000 (16:34 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 11 Apr 2012 08:46:19 +0000 (10:46 +0200)
commit7be255156feb7636a5cca5c4fe78f42879ffe69b
tree0255287041af5b79cb437e7d9003cd4c9a179dfc
parent5dc506ad841685c8404c085bd8cf9c5442518897
Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.

Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these
functions just to avoid an include, except to pay for it with worse runtime
performance.

On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15%
faster(!) than adding an additional call to qMemSet. The advantage on sizes
above that is unmeasurable.

For qMemCopy, the benefits are a little more modest: 16-7%.

Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
31 files changed:
src/corelib/global/qendian.h
src/corelib/global/qglobal.cpp
src/corelib/global/qglobal.h
src/corelib/global/qnumeric_p.h
src/corelib/kernel/qmetaobject.cpp
src/corelib/tools/qbytearraymatcher.cpp
src/corelib/tools/qstring.h
src/corelib/tools/qstringmatcher.cpp
src/corelib/tools/qvarlengtharray.h
src/corelib/tools/qvector.h
src/gui/accessible/qaccessible.h
src/gui/image/qpnghandler.cpp
src/gui/painting/qpainter.cpp
src/gui/text/qfontengine_qpa.cpp
src/gui/text/qfontengine_qpf.cpp
src/gui/text/qfontenginedirectwrite.cpp
src/gui/text/qglyphrun.cpp
src/gui/text/qrawfont.cpp
src/gui/text/qtextengine.cpp
src/network/access/qnetworkreplyimpl.cpp
src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
src/tools/moc/main.cpp
src/widgets/kernel/qgridlayout.cpp
tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp
tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
tests/baselineserver/shared/baselineprotocol.cpp
tests/benchmarks/corelib/tools/qvector/qrawvector.h