Set dupli_weights

is there a way to set the dupli weights in a particle system other than by using the operators which set the index, copy the active dupli weight and move the dupli weight around?

I made a script that controls which object in a group is rendered on which particle. This is done by setting the particle system to render the members of a group with “use count” activated.
The script then automatically calls the copy operator on the relevant dupli_weight, sets the count and then moves the newly created item of the list to where it is supposed to be.
It works but it is very cumbersome and gets very slow when dealing with large systems.

Is there a way to simply give it a list or a dictionary which contains the required object, its count and index or some other way?