This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

stepanov on i686-pc-linux-gnu


Stepanov for i686-pc-linux-gnu: I get

test      absolute   additions      ratio with
number    time       per second     test0

 0        1.06sec    94.34M         1.00
 1        1.15sec    86.96M         1.08
 2        1.07sec    93.46M         1.01
 3        1.36sec    73.53M         1.28
 4        1.14sec    87.72M         1.08
 5        1.34sec    74.63M         1.26
 6        1.21sec    82.64M         1.14
 7        1.36sec    73.53M         1.28
 8        1.15sec    86.96M         1.08
 9        1.35sec    74.07M         1.27
10        1.21sec    82.64M         1.14
11        1.39sec    71.94M         1.31
12        1.40sec    71.43M         1.32
mean:     1.24sec    80.68M         1.17

Total absolute time: 16.19 sec

Abstraction Penalty: 1.17

Here the misoptimization of test #3 seems more serious, in that the
ADDRESSOF stuff doesn't seem to be doing the right thing.

Inner loop of accumulate<double*, double> or accumulate<Double*, Double>:
(tests #1 and #2):

.L244:
	movl	%edx, %eax
	addl	$8, %edx
	cmpl	%ecx, %edx
	faddl	(%eax)
	jne	.L244

Inner loop of accumulate<double_pointer, double>:

.L262:
	faddl	(%eax)
	leal	8(%eax), %edx
	cmpl	%ecx, %edx
	movl	%edx, %eax
	jne	.L262
	movl	%edx, 8(%ebp)

Ouch!  The iterator is being retrieved and stored to memory.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]