[SERVER-2131] Dense arrays should be represented more compactly in BSON Created: 22/Nov/10  Updated: 22/Nov/10  Resolved: 22/Nov/10

Status: Closed
Project: Core Server
Component/s: Performance
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Kushal Dave Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Is there any hope of getting a representation for arrays in BSON that isn't derived from map? Every additional int adds 11 bytes!

> Object.bsonsize([1])
16
> Object.bsonsize([1,2])
27
> Object.bsonsize([1,2,3])
38
>



 Comments   
Comment by Eliot Horowitz (Inactive) [ 22/Nov/10 ]

There are other cases for similar things.
Though please note that numbers in javascript are doubles by default, so 11 is 8 + 3 overhead.
So ints would be 7 per.

Generated at Thu Feb 08 02:59:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.