GODRIVER-3026Backlog
Optimize Collection.insert()
The proposed solution for GODRIVER-2582 involves using reflection. This is very inefficient and non-idiomatic. A more optimized solution would be to defer the logic for parsing the document interface to the collection.insert method. The idea would be to marshal the documents in one operation like this: Here is a script: {code} package benchmark import ( "reflect" "testing" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/bsontype" ) func reflecti