Write a program to search for a specific value in an array. If the array is sorted, how would you optimize this search, and how would you implement it without using helper parameters?
Implement search_value(nums, target, is_sorted). Return the index of one matching value, or -1 if the value is absent. When is_sorted is true, use iterative binary search with local bounds rather than recursive helper parameters.
def search_value(nums, target, is_sorted):