class EL_BENCHMARK_COMPARISON
Client examples: ARRAYED_VS_HASH_SET_SEARCH ; ARRAYED_VS_LINKED_LIST ; ATTACH_TEST_VS_BOOLEAN_COMPARISON ; BIT_POP_COUNT_COMPARISON ; BIT_SHIFT_COUNT_COMPARISON ; CLASS_ID_ENUM_VS_TYPE_OBJECT ; COMPACTABLE_REFLECTIVE_VS_MANUAL_BIT_MASK ; DEVELOPER_COMPARISON ; DIRECTORY_WALK_VS_FIND_COMMAND ; HASH_TABLE_VS_NAMEABLES_LIST_SEARCH ; LIST_ITERATION_COMPARISON ; P_I_TH_LOWER_UPPER_VS_INLINE_CODE ; REFLECTED_REFERENCE_VS_OPTIMIZED_FIELD_RW ; ROUTINE_CALL_ON_ONCE_VS_EXPANDED ; STRING_8_SPLIT_VS_SPLIT_ON_CHARACTER_8 ; STRING_BENCHMARK_COMPARISON ; SYSTEM_TIME_COMPARISON ; TOKENIZED_STEPS_VS_XPATH_STRING
Benchmark comparison
note
description: "Benchmark comparison"
author: "Finnian Reilly"
copyright: "Copyright (c) 2001-2022 Finnian Reilly"
contact: "finnian at eiffel hyphen loop dot com"
license: "MIT license (See: en.wikipedia.org/wiki/MIT_License)"
date: "2023-08-08 8:52:53 GMT (Tuesday 8th August 2023)"
revision: "14"
deferred class
EL_BENCHMARK_COMPARISON
inherit
EL_COMMAND
EL_MODULE_LIO
EL_MODULE_EXECUTABLE
feature {EL_FACTORY_CLIENT} -- Initialization
make (a_trial_duration: INTEGER_REF)
do
trial_duration := a_trial_duration
initialize
end
feature -- Access
description: READABLE_STRING_GENERAL
deferred
end
feature -- Basic operations
execute
deferred
end
feature {NONE} -- Implementation
compare (label: READABLE_STRING_GENERAL; routines: ARRAY [TUPLE [READABLE_STRING_GENERAL, ROUTINE]])
local
table: EL_BENCHMARK_ROUTINE_TABLE
do
create table.make (label, routines)
if trial_duration.item.to_boolean then
table.set_trial_duration (trial_duration.item)
end
lio.put_new_line
lio.put_labeled_string ("Class", generator)
lio.put_new_line_x2
lio.put_labeled_string ("BENCHMARKING", table.label)
lio.put_new_line_x2
table.perform
table.print_comparison
lio.put_new_line
end
initialize
do
do_nothing
end
feature {NONE} -- Internal attributes
trial_duration: INTEGER_REF
end