ByteCount[expr]
给出 Wolfram 系统内部存放 expr 所需的字节数.
ByteCount
ByteCount[expr]
给出 Wolfram 系统内部存放 expr 所需的字节数.
范例
打开所有单元 关闭所有单元基本范例 (2)
属性和关系 (8)
ByteCount 在实际存放表达式时假设所有子表达式都不共用:
对于 ASCII 串,平均每个字符 ByteCount 增长 1:
MemoryConstrained 可中止超出指定 ByteCount 的表达式的生成:
可能存在的问题 (2)
技术笔记
-
▪
- 内存管理
相关指南
-
▪
- 内存测量和优化 ▪
- 调整和调试 ▪
- 表达式结构 ▪
- GPU 计算 ▪
- NVIDIA GPU 计算 ▪
- Apple GPU 计算
相关的工作流程
- 找出笔记本的大小
历史
1988年引入 (1.0)
文本
Wolfram Research (1988),ByteCount,Wolfram 语言函数,https://reference.wolfram.com/language/ref/ByteCount.html.
CMS
Wolfram 语言. 1988. "ByteCount." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/ByteCount.html.
APA
Wolfram 语言. (1988). ByteCount. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/ByteCount.html 年
BibTeX
@misc{reference.wolfram_2025_bytecount, author="Wolfram Research", title="{ByteCount}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/ByteCount.html}", note=[Accessed: 06-November-2025]}
BibLaTeX
@online{reference.wolfram_2025_bytecount, organization={Wolfram Research}, title={ByteCount}, year={1988}, url={https://reference.wolfram.com/language/ref/ByteCount.html}, note=[Accessed: 06-November-2025]}