# -*- coding: utf-8 -*-

import cProfile
import numpy as np

def f1(list0):
    list_sorted = sorted(list0)
    list_selected = [ i for i in list_sorted if i<0.5]
    list_calc = [i*i for i in list_selected]
    return list_calc
    
def f2(list0):
    list_selected = [ i for i in list0 if i<0.5]
    list_sorted = sorted(list_selected)
    list_calc = [i*i for i in list_sorted]
    return list_calc
    
def f3(list0):
    list_calc = [i*i for i in list0]
    list_sorted = sorted(list_calc)
    list_selected = [ i for i in list_sorted if i<0.5*0.5]
    return list_selected
    
list0 = [np.random.random() for i in range(100000)]

for i in range(1,4):
        print('f%s state:' %i)
        cProfile.run('f%s(list0)'%i )
        
        
A0 = dict(zip(('a','b','c','d','e'),(1,2,3,4,5)))
A1 = range(10)
list1 = [i for i in A1 if i in A0.values()]
90c68d39342968e6238f25e2fe3fceb92e621232
<mask token>


def f1(list0):
    list_sorted = sorted(list0)
    list_selected = [i for i in list_sorted if i < 0.5]
    list_calc = [(i * i) for i in list_selected]
    return list_calc


def f2(list0):
    list_selected = [i for i in list0 if i < 0.5]
    list_sorted = sorted(list_selected)
    list_calc = [(i * i) for i in list_sorted]
    return list_calc


def f3(list0):
    list_calc = [(i * i) for i in list0]
    list_sorted = sorted(list_calc)
    list_selected = [i for i in list_sorted if i < 0.5 * 0.5]
    return list_selected


<mask token>

<mask token>


def f1(list0):
    list_sorted = sorted(list0)
    list_selected = [i for i in list_sorted if i < 0.5]
    list_calc = [(i * i) for i in list_selected]
    return list_calc


def f2(list0):
    list_selected = [i for i in list0 if i < 0.5]
    list_sorted = sorted(list_selected)
    list_calc = [(i * i) for i in list_sorted]
    return list_calc


def f3(list0):
    list_calc = [(i * i) for i in list0]
    list_sorted = sorted(list_calc)
    list_selected = [i for i in list_sorted if i < 0.5 * 0.5]
    return list_selected


<mask token>
for i in range(1, 4):
    print('f%s state:' % i)
    cProfile.run('f%s(list0)' % i)
<mask token>

<mask token>


def f1(list0):
    list_sorted = sorted(list0)
    list_selected = [i for i in list_sorted if i < 0.5]
    list_calc = [(i * i) for i in list_selected]
    return list_calc


def f2(list0):
    list_selected = [i for i in list0 if i < 0.5]
    list_sorted = sorted(list_selected)
    list_calc = [(i * i) for i in list_sorted]
    return list_calc


def f3(list0):
    list_calc = [(i * i) for i in list0]
    list_sorted = sorted(list_calc)
    list_selected = [i for i in list_sorted if i < 0.5 * 0.5]
    return list_selected


list0 = [np.random.random() for i in range(100000)]
for i in range(1, 4):
    print('f%s state:' % i)
    cProfile.run('f%s(list0)' % i)
A0 = dict(zip(('a', 'b', 'c', 'd', 'e'), (1, 2, 3, 4, 5)))
A1 = range(10)
list1 = [i for i in A1 if i in A0.values()]

import cProfile
import numpy as np


def f1(list0):
    list_sorted = sorted(list0)
    list_selected = [i for i in list_sorted if i < 0.5]
    list_calc = [(i * i) for i in list_selected]
    return list_calc


def f2(list0):
    list_selected = [i for i in list0 if i < 0.5]
    list_sorted = sorted(list_selected)
    list_calc = [(i * i) for i in list_sorted]
    return list_calc


def f3(list0):
    list_calc = [(i * i) for i in list0]
    list_sorted = sorted(list_calc)
    list_selected = [i for i in list_sorted if i < 0.5 * 0.5]
    return list_selected


list0 = [np.random.random() for i in range(100000)]
for i in range(1, 4):
    print('f%s state:' % i)
    cProfile.run('f%s(list0)' % i)
A0 = dict(zip(('a', 'b', 'c', 'd', 'e'), (1, 2, 3, 4, 5)))
A1 = range(10)
list1 = [i for i in A1 if i in A0.values()]

# -*- coding: utf-8 -*-

import cProfile
import numpy as np

def f1(list0):
    list_sorted = sorted(list0)
    list_selected = [ i for i in list_sorted if i<0.5]
    list_calc = [i*i for i in list_selected]
    return list_calc
    
def f2(list0):
    list_selected = [ i for i in list0 if i<0.5]
    list_sorted = sorted(list_selected)
    list_calc = [i*i for i in list_sorted]
    return list_calc
    
def f3(list0):
    list_calc = [i*i for i in list0]
    list_sorted = sorted(list_calc)
    list_selected = [ i for i in list_sorted if i<0.5*0.5]
    return list_selected
    
list0 = [np.random.random() for i in range(100000)]

for i in range(1,4):
        print('f%s state:' %i)
        cProfile.run('f%s(list0)'%i )
        
        
A0 = dict(zip(('a','b','c','d','e'),(1,2,3,4,5)))
A1 = range(10)
list1 = [i for i in A1 if i in A0.values()]