# \[x-post from users forum\] Long compile times for a vector with 50K u64 values

**URL:** <https://internals.rust-lang.org/t/x-post-from-users-forum-long-compile-times-for-a-vector-with-50k-u64-values/11472>\
**Category:** internals\
**Created:** [December 12, 2019, 5:44am UTC](https://internals.rust-lang.org/t/x-post-from-users-forum-long-compile-times-for-a-vector-with-50k-u64-values/11472 "2019-12-12T05:44:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![smukherjee17](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@smukherjee17](https://internals.rust-lang.org/u/smukherjee17)\
**Post date:** [December 12, 2019, 5:44am UTC](https://internals.rust-lang.org/t/x-post-from-users-forum-long-compile-times-for-a-vector-with-50k-u64-values/11472/1 "2019-12-12T05:44:38Z")

</div>

This is my first post in this forum, so apologies if I make any mistakes.

This is a cross-post from [this](https://users.rust-lang.org/t/long-compile-times-for-a-vector-with-50k-u64-values/35625) post at the users forum.

"Hi guys, I'm trying to write a program where a large vector of u64's, with about 53000 elements of predefined values, needs to be stored and used. However, the program takes a long time to compile, about 24 seconds on my Ryzen 2700X machine. It was taking 47 seconds previously if I tried assigning the values after creating the matrices Vector.

I felt these compile times are rather long for such a program, so I wanted to ask your opinion. I've created a semi-barebones repository here 1. Just trying to compile this should take a while.

So I wanted to ask:

1. Is this compile times expected for this given scenario?
2. If not, is there any way to speed up the compilation? For example, the same code in C++ takes much less time to compile.

Thanks in advance!"

Some additional information:

1. This vec is completely precomputed, so no calculation needs to be done at compile or run-time. It is basically loading 53K u64 values into a vector for storage and lookup for calculations.
2. While it seems reasonable to store the values in a file, and read from them, this use-case might be of interest to the internals or the relevant team here.

Thanks in advance for your time!

---

<div class="post-metadata">

**Author:** ![josh](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/josh/32/5934_2.png) [@josh](https://internals.rust-lang.org/u/josh)\
**Post date:** [December 12, 2019, 10:01am UTC](https://internals.rust-lang.org/t/x-post-from-users-forum-long-compile-times-for-a-vector-with-50k-u64-values/11472/2 "2019-12-12T10:01:27Z")

</div>

This is a bug: [https://github.com/rust-lang/rust/issues/39352](https://github.com/rust-lang/rust/issues/39352)

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [March 11, 2020, 10:01am UTC](https://internals.rust-lang.org/t/x-post-from-users-forum-long-compile-times-for-a-vector-with-50k-u64-values/11472/3 "2020-03-11T10:01:28Z")

</div>

Closed on March 11, 2020, 10:01am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
