primitives optimization problem

Hi guys,

i need to optimize following code:

for (int j = 1; j < iAnzahlPunkte; j++)
{
glPushName(j);
glBegin(GL_LINES);
GLfloat iObjx = X_ToOpenGL (MyVector[i][j-1][1]);
GLfloat iObjy = Y_ToOpenGL (MyVector[i][j-1][2]);
glVertex2f(iObjx,iObjy);
iObjx = X_ToOpenGL (MyVector[i][j][1]);
iObjy = Y_ToOpenGL (MyVector[i][j][2]);
glVertex2f(iObjx,iObjy);
glEnd();
glPopName();
}

I know that it´s better to put all vertex inside the for loop and glBegin/glEnd outside the for loop.
But how can i assign the glPushName in this case to the single primitives ?

Thx in advance

You can not.
You have to choose