Commit 12e00f4e authored by Chris Toshok's avatar Chris Toshok

do 100 queries per insert instead of 1000 after all inserts.

this increases cpython time on _imperative.py to ~2 seconds (and lowers pyston's % from ~480% to ~380%).
the declarative benchmark takes 10 seconds for cpython with this change, but it doesn't work on pyston at all yet.
parent 98364232
...@@ -64,9 +64,8 @@ for i in xrange(100): ...@@ -64,9 +64,8 @@ for i in xrange(100):
session.add(new_address) session.add(new_address)
session.commit() session.commit()
# do 100 queries per insert
# now do 1000 queries for i in xrange(100):
for i in xrange(1000):
session.query(Person).all() session.query(Person).all()
print "done" print "done"
...@@ -56,9 +56,8 @@ for i in xrange(100): ...@@ -56,9 +56,8 @@ for i in xrange(100):
new_address = Address.insert() new_address = Address.insert()
new_address.execute(post_code='00000')#, person=new_person) new_address.execute(post_code='00000')#, person=new_person)
# do 100 queries per insert
# now do 1000 queries for i in xrange(100):
for i in xrange(1000):
s = Person.select() s = Person.select()
rs = s.execute() rs = s.execute()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment