This page says that ntdll.dll is "a Native API file of Microsoft operating systems and it contains NT kernel functions". Kind of vague, but perhaps if the code is doing any system calls (accessing files, perhaps), that may account for it. Or perhaps if your program uses a lot of memory, some virtual memory software may be kicking in to move your data from disk to RAM periodically.
Does your hard disk get much usage while the program is running?
Hello DWKS! Thank You for your answer.
You have the point. I watched Process Explorer during a long series of repeated running of my program. I saw a lot of page faults. So that slowed down my program.
It turned out that the lpsolve 5.5 's dll, more exactly the solution of the linear programming model produced the large number of page faults. Putting that line into comment dropped the % portion of the ntdll in the running time. So my original problem is solved, but I am not so happy having found that an outer party dll causes everything. I do not see yet how it can be influenced.
Anyway, you showed the right way, thanks again.