Skip to content

Instantly share code, notes, and snippets.

@mcuadros
Last active August 29, 2015 13:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcuadros/9560576 to your computer and use it in GitHub Desktop.
Save mcuadros/9560576 to your computer and use it in GitHub Desktop.
Mongator Benchmarks @ HHVM + Mongofill

Mongator Benchmarks @ HHVM + Mongofill

Mongator is a simple MongoDB ODM to claims to be 3x faster than Doctrine, now thanks to Mongofill a pure PHP implementation of MongoDB driver, is possible run this package under HHVM.

The benchmarks, are based on athletic.

The native version uses the standard mongo driver, and HHVM is running the lastest mastver version with Mongofill ae5c155 + bson-hni 0.0.1

A bencmarks of a plain version of mongofill can be found at https://gist.github.com/mcuadros/9551290

The previous results was invalid, mongofill was using w => 0

MongoDB native driver 1.4.5 - PHP 5.5.9-1+sury.org~precise+1

Mongator\Benchmarks\DeletingEvent
    Method Name      Iterations    Average Time      Ops/second
    --------------  ------------  --------------    -------------
    simpleDocument: [500       ] [0.0010676503181] [936.63626]


Mongator\Benchmarks\FindingEvent
    Method Name             Iterations    Average Time      Ops/second
    ---------------------  ------------  --------------    -------------
    simpleDocument       : [100       ] [0.0050657963753] [197.40233]
    simpleNestedDocument : [100       ] [0.0239493465424] [41.75479]
    complexDocument      : [100       ] [0.0044594192505] [224.24445]
    complexNestedDocument: [100       ] [0.0327576518059] [30.52722]


Mongator\Benchmarks\InsertingEvent
    Method Name             Iterations    Average Time      Ops/second
    ---------------------  ------------  --------------    -------------
    simpleDocument       : [500       ] [0.0002365384102] [4,227.64319]
    simpleNestedDocument : [500       ] [0.0027978444099] [357.41802]
    complexDocument      : [500       ] [0.0015546274185] [643.24094]
    complexNestedDocument: [500       ] [0.0103557138443] [96.56505]


Mongator\Benchmarks\UpdatingEvent
    Method Name             Iterations    Average Time      Ops/second
    ---------------------  ------------  --------------    -------------
    simpleDocument       : [500       ] [0.0002596526146] [3,851.29956]
    simpleNestedDocument : [500       ] [0.0052123699188] [191.85131]
    complexDocument      : [500       ] [0.0419555816650] [23.83473]
    complexNestedDocument: [500       ] [0.0104919481277] [95.31118]

Mongofill ae5c155 + bson-hni 0.0.1 - HipHop VM 2.5.0-dev+2014.03.18

Mongator\Benchmarks\DeletingEvent
    Method Name      Iterations    Average Time      Ops/second
    --------------  ------------  --------------    -------------
    simpleDocument: [500       ] [0.0010088286574] [991.24862]


Mongator\Benchmarks\FindingEvent
    Method Name             Iterations    Average Time      Ops/second
    ---------------------  ------------  --------------    -------------
    simpleDocument       : [100       ] [0.0045077730000] [221.83904]
    simpleNestedDocument : [100       ] [0.0101732518039] [98.29699]
    complexDocument      : [100       ] [0.0056411553399] [177.26865]
    complexNestedDocument: [100       ] [0.0147636320747] [67.73401]


Mongator\Benchmarks\InsertingEvent
    Method Name             Iterations    Average Time      Ops/second
    ---------------------  ------------  --------------    -------------
    simpleDocument       : [500       ] [0.0002250595132] [4,443.26926]
    simpleNestedDocument : [500       ] [0.0014397998104] [694.54101]
    complexDocument      : [500       ] [0.0015623908312] [640.04473]
    complexNestedDocument: [500       ] [0.0054009176230] [185.15373]


Mongator\Benchmarks\UpdatingEvent
    Method Name             Iterations    Average Time      Ops/second
    ---------------------  ------------  --------------    -------------
    simpleDocument       : [500       ] [0.0002813148547] [3,554.73591]
    simpleNestedDocument : [500       ] [0.0016406474395] [609.51548]
    complexDocument      : [500       ] [0.0290804944273] [34.38731]
    complexNestedDocument: [500       ] [0.0027153792848] [368.27268]

Server info:

Dell R210 II

  • CPU: 1x Intel® Xeon® E3 1230 v2
  • Memory: 16 GB DDR3 ECC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment