<commit_before># zwei 01/07/14
# generator expression as argument to a built-in call
import time

def call_generator(num, iteration):
	item = 42
	for t in range(iteration):
		num += t % 5
		item = sum(x % 5 for x in range(num))

	return item

def call_generator_localvar(num, iteration):
	item = 0
	for t in range(iteration):
		num += t % 5
		ge = (x % 5 for x in range(num))
		item = sum(ge)

	return item

def measure():
	print("Start timing...")
	start = time.time()

	num = 1000
	last_item = call_generator(num, 10000) #1000000

	print("Last item ", last_item)

	duration = "%.3f\n" % (time.time() - start)
	print("generator-expression: " + duration)

#warm up
for run in range(1000):
	call_generator(10, 100)

measure()<commit_msg>fix measurement print out in genexp-builtin-call<commit_after># zwei 01/07/14
# generator expression as argument to a built-in call
import time

def call_generator(num, iteration):
	item = 42
	for t in range(iteration):
		num += t % 5
		item = sum(x % 5 for x in range(num))

	return item

def call_generator_localvar(num, iteration):
	item = 0
	for t in range(iteration):
		num += t % 5
		ge = (x % 5 for x in range(num))
		item = sum(ge)

	return item

def measure():
	print("Start timing...")
	start = time.time()

	num = 1000
	last_item = call_generator(num, 10000) #1000000

	print("Last item ", last_item)

	duration = "%.3f\n" % (time.time() - start)
	print("genexp-builtin-call: " + duration)

#warm up
for run in range(1000):
	call_generator(10, 100)

measure()
{'fraction_non_alphanumeric': 0.13346613545816732, 'fraction_numerical': 0.05179282868525897, 'mean_word_length': 3.784126984126984, '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': '6439140', 'n_tokens_mistral': 618, 'n_tokens_neox': 535, 'n_words': 178}