none
如何提高for循环语句的运行速度? RRS feed

  • 问题

  • for (int i = 1; i <= 30; i++)
                {
                    for (int j = 1; j <= 30; j++)
                    {
                        for (int k = 1; k <= 30; k++)
                        {
                            for (int r = 1; r <= 30; r++)
                            {
                                for (int m = 1; m <= 30; m++)
                                {
                                    for (int n = 1; n <= 30; n++)
                                    {
                                        Response.Write(i+j+k+r+m+n);
                                        Response.Write("<br />");
                                    }
                                }
                            }
                        }
                    }
                }

    请问哪位高手,可以让这个数据量比较大的for循环语句提高计算速度。

    2012年11月14日 16:58

全部回复