From ef7d9b36aaa97d688507cf80ef7862e36c61cc4b Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Sun, 26 Jan 2014 21:04:00 +0100 Subject: [PATCH] fix preallocate_stack performance-test (unwinding) --- performance/performance_create_prealloc.cpp | 22 +++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/performance/performance_create_prealloc.cpp b/performance/performance_create_prealloc.cpp index a82906d..dd57563 100644 --- a/performance/performance_create_prealloc.cpp +++ b/performance/performance_create_prealloc.cpp @@ -31,10 +31,13 @@ duration_type measure_time() { stack_allocator stack_alloc; - // cache warum-up - boost::coroutines::coroutine< void >::pull_type c( fn, - boost::coroutines::attributes( stack_allocator::default_stacksize(), unwind_stack, preserve_fpu), - stack_alloc); + { + // cache warum-up + boost::coroutines::coroutine< void >::pull_type c( fn, + boost::coroutines::attributes( + stack_allocator::default_stacksize(), unwind_stack, preserve_fpu), + stack_alloc); + } time_point_type start( clock_type::now() ); for ( std::size_t i = 0; i < jobs; ++i) { @@ -54,10 +57,13 @@ cycle_type measure_cycles() { stack_allocator stack_alloc; - // cache warum-up - boost::coroutines::coroutine< void >::pull_type c( fn, - boost::coroutines::attributes( stack_allocator::default_stacksize(), unwind_stack, preserve_fpu), - stack_alloc); + { + // cache warum-up + boost::coroutines::coroutine< void >::pull_type c( fn, + boost::coroutines::attributes( + stack_allocator::default_stacksize(), unwind_stack, preserve_fpu), + stack_alloc); + } cycle_type start( cycles() ); for ( std::size_t i = 0; i < jobs; ++i) {