Oracle does not check for determinism so you can mark any function you like as DETERMINISTIC whether it is or not.

AFAIK DETERMINISTIC functions are *NOT* cached by Oracle on the fly in SQL (whatever Oracle Docs. might imply). Where the result of the function is stored in a Function-based index it may be used in place of re-calculating the function. The DETERMINISTIC keyword is simply a flag for Function-based index eligibility.

Fastest approach here would be a single SQL - either update or better still CTAS into new table if applicable. Question is really what 'other stuff happens here with x_pos y_pos' and whether it can be done in-line in SQL. Rarely do I see a cursor for..loop written because it 'could not be done in SQL' that *really* could not be done in SQL.