Moving problem in glverterx

hi friends,
I have around 16,00,000 vertices each consists of start and end points.i’m using these vertices to draw a object.

code:
int j=0;
for(int i=0;i<array.count()/2;i++)
{
j=i;
j++;
glBegin(GL_LINE_LOOP);
glVertex3f(array(i),array(i),array(i));
glVertex3f(array(j),array(j),array(j));
glEnd();
}

while drawing and moving this object it so much time.please help me regarding this issue.

Of course it will be slow, as you have so many CPU operations to feed the GPU.

Either compile that in a display list, or (better) store the data in a VBO so that you can draw the whole object with a few calls :
http://www.opengl.org/wiki/Vertex_Buffer_Object