Compare the performance of select case
, if elseif
and goto
branching flows.
program bench_select_if_goto
use iso_fortran_env
implicit none
integer function djb_hash(str) result(hash) | |
implicit none | |
character(len=*),intent(in) :: str | |
integer :: hash | |
integer :: i | |
hash = 5381 | |
do i=1,len(str) |