F.A.Qs Home ProblemSet Status Ranklist Contest LoginRegister
Notice:1:五月份月赛定于5.27日12:30--17:30,欢迎大家来玩! 2:关于OJ的注册可看https://www.lydsy.com/JudgeOnline/wttl/thread.php?tid=5671
大视野在线测评-欢迎您
[ New Thread ]
Problem 3509 >> 震惊!循环展开只是个噱头!
EdwardFrog @ 2018-01-12 08:38:36
[ Quote ] [ Edit ] [ Delete ] 1#
我把展开层数改成一层也跑的飞快哎...
核心代码:
tmp=0;
while(p1<=lim1&&p2>=lim2)tmp+=(*p1)*(*p2),p1++,p2--;
ans+=tmp;
变成真·大暴力了,但只比展开15层慢了1s,是不是说明循环展开用处没有想象的那么大?
nzhtl1477 @ 2018-01-12 13:41:54
[ Quote ] [ Edit ] [ Delete ] 2#
本来循环展开就没什么用。。
Marco @ 2018-01-12 23:32:32
[ Quote ] [ Edit ] [ Delete ] 3#
我怎么不太信啊,姿势不对?大雾)
nzhtl1477 @ 2018-01-13 10:25:07
[ Quote ] [ Edit ] [ Delete ] 4#
bzoj不能用avx
nzhtl1477 @ 2018-01-13 10:25:23
[ Quote ] [ Edit ] [ Delete ] 5#
普通的循环展开优化不明显吧
iloi @ 2018-01-13 11:41:46
[ Quote ] [ Edit ] [ Delete ] 6#
interesting
EdwardFrog @ 2018-01-13 16:32:34
[ Quote ] [ Edit ] [ Delete ] 7#
@Marco
循环展开跑11s多,大暴力12s
[Top] [Previous Page] [Next Page]

HOME Back