How to write a technical paper of a not so significant idea?
Quite possibly, your supervisor is encouraging you to write early, to learn how to write, and to get into the habit of writing your results down.

You would gain a lot by watching this youtube video by Haskell inventor Simon Peyton Jones on How to write a great research paper. Part of his message is that you can do the research while you are writing, meaning that many ideas will come to you as you are writing things down.

You ask how to write a paper. Didn't you just read a whole bunch? Pick one that you found easy to follow and inspiring. Model your paper on its structure and style.

Regarding the actual work. A formal model of a for-loop has already been done, so I suspect that this is not the right level of abstraction to consider. What is the data to which your for loop applied? What did it mean? What did the parameters mean? How are the results of your code interpreted? Were some better than others? On what scale?
Part of science is learning to ask and answer the right questions.