# A better way to create list of imaginary parts of Zeta zeros

Is there a better way to create a list of the imaginary parts of Zeta zeros than

Table[Im[ZetaZero[i]], {i, 1, 100}] ?

For values of the index greater than a few thousand the run-time is long. I think that it's the Im[ ] or Abs[ ] that burns the time, and the list without this compiles very quickly. I know there are upwards of 10M zeros programmed in, so hopefully there is a way to do this more efficiently.

• (Shameless plug) In this paper here, the first 14400 ZetaZero's at precision 10000 are available for download. The notebook containing them can be downloaded at https://wolfr.am/mertens. Jan 6, 2018 at 4:32

t0 = AbsoluteTime[];
Table[Im[N[ZetaZero[i]]], {i, 1, 1000}]
t1 = AbsoluteTime[];
d1 = N[t1 - t0]


on my computer, d1 is around 13.366 seconds.

t1 = AbsoluteTime[];
Im[Table[N[ZetaZero[i]], {i, 1, 1000}]]
t2 = AbsoluteTime[];
d2 = N[t2 - t1]


and d2 is 14.0818

t2 = AbsoluteTime[];
Im[ParallelTable[N[ZetaZero[i]], {i, 1, 1000}]]
t3 = AbsoluteTime[];
d3 = N[t3 - t2]


and d3 is 6.01491 seconds.

I suggest you use ParallelTable[] instead of Table[].

• 14 seconds ia fine--but is there hope for i = 10000? Jan 5, 2018 at 22:42
• Again, on my computer (I mean it depends on your hardware and computational power like RAM, CPU, etc.) for 10000, it takes 131.558 second with Table[] and with ParallelTable[] it takes 41.1411 seconds. Jan 6, 2018 at 0:24
• Rajil: Ah. My machine is much slower. Thanks. Jan 6, 2018 at 6:14