Efficiently accessing primitive attributes

Is there any way to access the primitive attributes on the textSOP without using python? In particular, I am trying to access the glpyh_index primitive attribute, and accessing it from python via something like op("textSOP").prims[i].glyphIndex.val. Is there a more performant way to get an array of all of the primitive attributes, e.g. via the sopToCHOP or something like that?

I am working with a textSOP with ~3000 characters and trying to find the bounding box per character, so I need to find the glyphIndex per point

Would a CPlusPlus operator (either chop or sop) allow me to access this data? from looking at the CPlusPlus_Common.h file, I can see ways to get the primitives for a SOP and the attributes of a SOP, but i’m not sure how to access primitiveAttributes (in particular, the glyphIndex attribtue on a textSOP)