not sure to understand, are you suggesting i should create a dictionary or that you would rewrite SpriteAttachPoints code with a dictionary?
i just thought that might be one of those cases that it allocates only if you run it from editor, i spent several hours after a 0.5k allocation on GetComponent and then i found on the net explanation for it, it only happens in editor and only when the component is not found , the allocation is to be able to display the error message as far as i understood, i made the test profiling the built and indeed it does not happen , i will try this with the AttachPoint , hopefully it's a similar case and won't happen in a build.