kyriosli / node-shared-cache

An interprocess shared LRU cache module for Node.JS
149 stars 30 forks source link

What is "c-binary serialization"? #4

Open gajus opened 8 years ago

gajus commented 8 years ago

Documentation gives this example of "c-binary serialization":

console.time('binary serialization');
for(var i = 0; i < 100000; i++) {
    obj.test = input;
}
console.timeEnd('binary serialization');

This is just assigning a value to the same object property. How is the data persisted?

mgttt commented 7 years ago

when exec obj.test = ttttt the addon will forward the call to the setter in c/c++ which will call bson to do the s/ns job.