~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/benchmarks/bench_knit.py

  • Committer: John Arbash Meinel
  • Date: 2007-05-09 18:45:20 UTC
  • mto: This revision was merged to the branch mainline in revision 2614.
  • Revision ID: john@arbash-meinel.com-20070509184520-hd6la926t5hfshbr
Use direct functions when possible, and avoid extra dict lookups.
  test_read_50k_index_c           338ms
  test_read_50k_index_c_again     351ms
  test_read_50k_index_py          901ms
  test_read_50k_index_py_again   1023ms

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
        knit._load_data = knit._load_data_py
76
76
 
77
77
    def test_read_50k_index_c(self):
 
78
        self.setup_load_data_c()
78
79
        self.create_50k_index()
79
 
        self.setup_load_data_c()
80
80
        t = self.get_transport()
81
81
        kndx = self.time(knit._KnitIndex, t, 'test.kndx', 'r')
82
82
 
83
83
    def test_read_50k_index_c_again(self):
 
84
        self.setup_load_data_c()
84
85
        self.create_50k_index()
85
 
        self.setup_load_data_c()
86
86
        t = self.get_transport()
87
87
        kndx = self.time(knit._KnitIndex, t, 'test.kndx', 'r')
88
88