how to know if this code slow ?
i want to write some code to check sensors and some input
each one has function and i will call them via loop()
"slow" is relative.
A payroll system is real-time, because if things don't get delivered on time in response to certain inputs (by a certain day each month), all kinds of other things can go wrong.
A disk drive controller is also real-time, though on a different timescale.
It is up to you to work out what the response time of your system is, because we can't comment.
You haven't told us what you want to do.