profiling two algorithms