This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Use i64 as array length to support super large array #17958
Labels
Feature Request
This issue is made to request a feature.
Describe the feature
Use datatype i64 instead of int as the array's len, offset and cap.
Use Case
Currently vlang use int as the array length, this will cause problem when try to using vlang in science computation. It does not support super large array.
for example, the following code will hang ...
by changing the 1073741825 to 1073741824, it will work.
try reading 1073741824 memory traces grow done
Proposed Solution
replace int with i64 in array code.
Other Information
No response
Acknowledgements
Version used
0.3.3 524f7c3
Environment details (OS name and version, etc.)
V full version: V 0.3.3 4f532c0.524f7c3
OS: linux, Ubuntu 22.04.2 LTS
Processor: 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz
getwd: /home/haha/v
vexe: /HD/github/lang/v/v
vexe mtime: 2023-04-13 09:18:04
vroot: OK, value: /HD/github/lang/v
VMODULES: OK, value: /home/haha/.vmodules
VTMP: OK, value: /tmp/v_1000
Git version: git version 2.34.1
Git vroot status: weekly.2023.15-8-g524f7c3e-dirty (10 commit(s) behind V master)
.git/config present: true
CC version: cc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
thirdparty/tcc status: thirdparty-linux-amd64 12f392c3-dirty
The text was updated successfully, but these errors were encountered: