Skip to content

Instantly share code, notes, and snippets.

@deepfryed
Created August 1, 2010 00:40
Show Gist options
  • Save deepfryed/502796 to your computer and use it in GitHub Desktop.
Save deepfryed/502796 to your computer and use it in GitHub Desktop.
* DataMapper, Active Record and Swift comparisons with GC disabled.
* #create runs once creating the rows.
* #select and #update iterates through them <runs> times.
* memory usage is measured as (total rss of process after - before) benchmark is run.
-- driver: mysql rows: 5000 runs: 5 --
benchmark sys user total real rss
dm #create 0.170000 1.780000 1.950000 3.655825 108.36m
dm #select 0.300000 4.420000 4.720000 4.739661 322.62m
dm #update 1.830000 18.720000 20.550000 28.819360 1412.11m
ar #create 0.270000 2.600000 2.870000 3.897787 151.60m
ar #select 0.040000 0.500000 0.540000 0.559071 57.29m
ar #update 1.600000 12.330000 13.930000 20.052599 771.29m
swift #create 0.120000 0.300000 0.420000 2.118335 13.89m
swift #select 0.020000 0.400000 0.420000 0.518972 27.74m
swift #update 0.510000 1.510000 2.020000 5.263985 75.05m
swift #write 0.000000 0.040000 0.040000 0.087842 3.13m
-- driver: postgresql rows: 5000 runs: 5 --
benchmark sys user total real rss
dm #create 0.250000 2.080000 2.330000 3.147116 118.04m
dm #select 0.280000 4.580000 4.860000 5.027557 322.66m
dm #update 1.790000 19.670000 21.460000 27.061896 1439.17m
ar #create 0.260000 3.230000 3.490000 4.899369 183.70m
ar #select 0.150000 0.780000 0.930000 1.054142 97.12m
ar #update 2.030000 14.670000 16.700000 24.084335 865.98m
swift #create 0.130000 0.790000 0.920000 2.035326 13.69m
swift #select 0.000000 0.420000 0.420000 0.498745 28.98m
swift #update 0.360000 2.140000 2.500000 5.374531 75.95m
swift #write 0.000000 0.060000 0.060000 0.170981 3.13m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment