I present Vanilla Object Orientation (VOO), a framework that composes classes from Tcl's native data structures -- lists and dictionaries -- rather than introducing additional framework infrastructure. VOO objects are plain Tcl lists with automatic memory management through copy-on-write semantics, eliminating the destructor burden inherent in TclOO and Itcl. Benchmarks on Tcl 8.6.13 and Tcl 9.0 show VOO achieves 7--18x faster object creation and 4--6x superior memory efficiency compared to TclOO. A companion C++ migration path (VOO C++) further improves field-access speed (setter 2.3--2.6x faster) and memory (6.8--9.8x lighter than TclOO), while preserving an identical Tcl call-site API. Cross-version analysis confirms that VOO's compositional design scales better than framework-based approaches as the interpreter evolves.


翻译:本文提出原生面向对象(Vanilla Object Orientation,VOO)框架,该框架利用Tcl原生数据结构(列表与字典)构建类,无需引入额外的框架基础设施。VOO对象作为纯Tcl列表存在,通过写时复制语义实现自动内存管理,消除了TclOO和Itcl中固有的析构器负担。基于Tcl 8.6.13与Tcl 9.0的基准测试表明,相较于TclOO,VOO对象创建速度提升7-18倍,内存效率提升4-6倍。配套的C++迁移路径(VOO C++)进一步优化了字段访问速度(setter提速2.3-2.6倍)与内存效率(比TclOO轻量6.8-9.8倍),同时保持与Tcl完全一致的调用端API。跨版本分析证实,随着解释器演进,VOO的组合式设计比基于框架的方法具有更优的可扩展性。

0
下载
关闭预览

相关内容

AI原生数据库发展趋势白皮书
专知会员服务
18+阅读 · 5月16日
视觉-语言-动作(VLA)模型的前世今生
专知会员服务
21+阅读 · 2025年8月29日
VILA-U:一个融合视觉理解与生成的统一基础模型
专知会员服务
21+阅读 · 2024年9月9日
使用多模态语言模型生成图像
专知会员服务
32+阅读 · 2023年8月23日
【2021新书】面向对象的Python编程,418页pdf
专知会员服务
71+阅读 · 2021年12月15日
变分自编码器VAE:一步到位的聚类方案
PaperWeekly
25+阅读 · 2018年9月18日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
Arxiv
0+阅读 · 4月2日
VIP会员
相关主题
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
6+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
4+阅读 · 6月17日
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员