从XML文件或文本文件中读取哪个更快? [英] Which is faster to read from, XML file or text file?

查看:104
本文介绍了从XML文件或文本文件中读取哪个更快?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不在乎它要花多长时间,但我想知道从哪个读取速度更快.

例如,我正在从文件中读取点并放入数组中,这会更快吗?哪个班级可以快速读取特定数据?

它需要达到多快的重要性不是问题.这只是出于我自己的理论知识.

I don''t care how fast it will take to make it, but I want to know which is faster to be read from.

For example I am reading in points from a file and put into an array, which would be faster? Which class would read that particular data fast?

The importance of how fast it needs to be is not a problem. It is just for my own theoretical knowledge.

推荐答案

XML和文本文件都是文本文件.

阅读它们的速度是相同的.

改变总完成时间的是您打算如何处理和将读取的数据存储在内存中.

显然,XML比纯文本文件具有更多的结构要处理.因此,对于纯批量数据传输,请使用CSV文本文件.
XML and text files are both text files.

The speed of reading them is the same.

What changes the overall time to finish is how you intend to process and store in memory the data read.

Obviously XML has more structure to process than a plain text file. So for pure bulk data transfer use CSV text files.


这篇关于从XML文件或文本文件中读取哪个更快?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆