Is defining a function inside a loop without time penalty?

thank you @soegaard , i had a little doubt, now it is clear:

i wanted to say interpreted , like the BASIC on an old computer (Apple 2 for example) ,interpreted for me is really at runtime only.

it was the cal procedure from this generated code:

($nfx$
   data-xml
   <-
   (for/list
    ((one-data-row data-interpol) (one-trajectory-row data-trajectory))
    ($nfx$
     (index X_MSO Y_MSO Z_MSO VALx VALy VALz)
     <-
     (apply values (string-split one-data-row)))
    ($nfx$
     (time-stamp x_traj_mso y_traj_mso z_traj_mso)
     <-
     (apply values (string-split one-trajectory-row)))
    (define (cal val) ($nfx$ val * Bsw / B0))
    `(TR
      (TD ,time-stamp)
      (TD ,X_MSO)
      (TD ,Y_MSO)
      (TD ,Z_MSO)
      (TD ,(cal (string->number VALx)))
      (TD ,(cal (string->number VALy)))
      (TD ,(cal (string->number VALz))))))

generated from this scheme+ source code:

{data-xml <- (for/list ([one-data-row data-interpol]
				[one-trajectory-row data-trajectory])

			       ;; take in SimulationData.txt Bo or Vo x,y,z, compute norm
			       ;; compute B or V in output file like this:
			       ;; B_x|y|z_XML=Bintermediate_unit_code_x|y|z * Bsw   /  |Bo input|                             with Bsw=10nT
			       
			       {(index X_MSO Y_MSO Z_MSO VALx VALy VALz) <- (apply values
										   (string-split one-data-row))}
			       {(time-stamp x_traj_mso y_traj_mso z_traj_mso) <- (apply values
											(string-split one-trajectory-row))}

			       (define (cal val) {val * Bsw / B0})
			    
			       `(TR (TD ,time-stamp)
				    (TD ,X_MSO)
				    (TD ,Y_MSO)
				    (TD ,Z_MSO)
				    (TD ,(cal (string->number VALx)))
				    (TD ,(cal (string->number VALy)))
				    (TD ,(cal (string->number VALz)))))}

just for info it is related from the other post, i'm debugging:

https://racket.discourse.group/t/valid-numeric-entity-refused-by-xexpr-xml/3393