On Thu, 16 Jun 2011, John Peterson wrote:

> Some results on my workstation for doubles: memset is roughly 2 orders
> of magnitude faster than std::fill when it is measurable.
>
> N        Fill method  Memset method
> 1000000  0.012151s    0.000625s

Here's what I get with a few compiler/optimization combinations on my
workstation:

icpc (ICC) 11.1 20100806

Compiler         Fill method  Memset method
icpc 11.1        0.000497s    0.000459s
icpc 11.1 -O2    0.000494s    0.000462s
icpc 11.1 -O3    0.000468s    0.000436s
gcc 4.4.3        0.002422s    0.000616s
gcc 4.4.3 -O2    0.000573s    0.000632s
gcc 4.4.3 -O3    0.000486s    0.000632s
gcc 4.5.1        0.002383s    0.000618s
gcc 4.5.1 -O2    0.000584s    0.000625s
gcc 4.5.1 -O3    0.000473s    0.000633s

And on my (slower, less consistent!) laptop:
gcc 4.5.2        0.003884s    0.001752s
gcc 4.5.2 -O2    0.001789s    0.002191s
gcc 4.5.2 -O3    0.001776s    0.002186s


So this is very compiler-specific - on some fairly recent compilers,
memset ranges from 7% faster to 25% slower!

What compiler and flags are you using?  It looks like the real
optimization you need here is a change in one or both of those!
---
Roy

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to