<commit_before>'use strict';
require('../runner')(function (benchmark, dbs, ctx) {
	var SQL = 'SELECT ' + ctx.columns.join(', ') + ' FROM ' + ctx.table + ' WHERE rowid=?';
	var betterSqlite3 = dbs['better-sqlite3'];
	var nodeSqlite3 = dbs['node-sqlite3'];
	var rowid = 0;
	
	benchmark.add('better-sqlite3', function () {
		betterSqlite3.prepare(SQL).pluck().get(rowid++ % 1000 + 1);
	});
	benchmark.add('node-sqlite3', function (deferred) {
		nodeSqlite3.get(SQL, rowid++ % 1000 + 1).then(function () {deferred.resolve();});
	});
});<commit_msg>made select benchmarks more fair<commit_after>'use strict';
require('../runner')(function (benchmark, dbs, ctx) {
	var SQL = 'SELECT ' + ctx.columns.join(', ') + ' FROM ' + ctx.table + ' WHERE rowid=?';
	var betterSqlite3 = dbs['better-sqlite3'];
	var nodeSqlite3 = dbs['node-sqlite3'];
	var rowid = 0;
	
	benchmark.add('better-sqlite3', function () {
		betterSqlite3.prepare(SQL).get(rowid++ % 1000 + 1);
	});
	benchmark.add('node-sqlite3', function (deferred) {
		nodeSqlite3.get(SQL, rowid++ % 1000 + 1).then(function () {deferred.resolve();});
	});
});
{'fraction_non_alphanumeric': 0.21162579473206175, 'fraction_numerical': 0.03451407811080836, 'mean_word_length': 4.861702127659575, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7215903', 'n_tokens_mistral': 441, 'n_tokens_neox': 403, 'n_words': 76}