Re:动态分配文件缓冲区 [英] Re: dynamic allocation file buffer

查看:59
本文介绍了Re:动态分配文件缓冲区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

On Tue,2008年9月9日14:59:19 -0700,castironpi写道:

On Tue, 09 Sep 2008 14:59:19 -0700, castironpi wrote:


我会再次尝试我的想法。我想和人们讨论一下我想要写的模块,我会花点时间来解释一下。我认为这是一个很酷的想法。许多人,原谅俚语,可以从中获益。它的缺点是什么?
I will try my idea again. I want to talk to people about a module I
want to write and I will take the time to explain it. I think it''s a
"cool idea" that a lot of people, forgiving the slang, could benefit
from. What are its flaws?



[用非常可靠的用例剪断长描述]


你已经创建了一个解决方案一个问题(可能)只会影响极少数人,至少从你的用例来判断。谁拥有

a 4GB的XML文件,以及它们吸了多少裂缝?


Castironpi,*你*使用这个概念验证模块做什么?不要

打扰告诉我们您的想法*我们应该使用它。告诉我们你使用它的原因是什么,或者至少是其他人使用它的原因。如果这只是一个你认为很酷的模块,我不喜欢你有机会照顾他们。并不缺少酷的东西。对于任何东西都没用的软件

,与眼睛糖果不同,没有人会因为喜欢算法而使用你的模块




如果您没有该软件的现有应用程序,请解释

它的作用(而不是如何)并对性能有所了解(它 's alpha

用Python编写并且速度很慢,但是我会用C重新编写它并且

期望它在10GB文件中进行十亿次随机访问每

毫秒,或者其他什么)。你可能很幸运,有人说

嘿,那只是我解决问题所需的工具!

-

史蒂文

[snip long description with not-very-credible use-cases]

You''ve created a solution to a problem which (probably) only affects a
very small number of people, at least judging by your use-cases. Who has
a 4GB XML file, and how much crack did they smoke?

Castironpi, what do *you* use this proof-of-concept module for? Don''t
bother tell us what you think *we* should use it for. Tell us what you''re
using it for, or at least what somebody else is using it for. If this is
just a module that you think will be cool, I don''t like your chances of
people caring. There is no shortage of "cool" software that isn''t useful
for anything, and unlike eye-candy, nobody is going to use your module
just because they like the algorithm.

If you don''t have an existing application for the software, then explain
what it does (not how) and give some idea of the performance ("it''s alpha
and written in Python and really slow, but I will re-write it in C and
expect it to make a billion random accesses in a 10GB file per
millisecond", or whatever). You might be lucky and have somebody say
"Hey, that''s just the tool I need to solve my problem!".
--
Steven

推荐答案

9月9日,5:58 * pm,Steven D''Aprano< st ... @ REMOVE -THIS-

cybersource.com.auwrote:
On Sep 9, 5:58*pm, Steven D''Aprano <st...@REMOVE-THIS-
cybersource.com.auwrote:

On Tue,2008年9月9日14:59:19 -0700,castironpi写道:
On Tue, 09 Sep 2008 14:59:19 -0700, castironpi wrote:

我会再次尝试我的想法。 *我想和人们谈谈我想写的模块,我会花点时间来解释一下。 *我认为这是一个很酷的想法。许多人,原谅俚语,可以从中获益。 *它的缺点是什么?
I will try my idea again. *I want to talk to people about a module I
want to write and I will take the time to explain it. *I think it''s a
"cool idea" that a lot of people, forgiving the slang, could benefit
from. *What are its flaws?



[使用非常可靠的用例剪断长描述]


[snip long description with not-very-credible use-cases]



Steven,

Steven,


你已经创建了一个问题的解决方案,这个问题(可能)只影响了很少的人,至少可以判断你的用例。谁有4GB的XML文件,他们吸了多少裂缝?
You''ve created a solution to a problem which (probably) only affects a
very small number of people, at least judging by your use-cases. Who has
a 4GB XML file, and how much crack did they smoke?



我判断是否存在''shelve''和''pickle''模块,以及

关系数据库包,即我正在解决的问题不是很少见。它可能是街对面的百万富翁投资者,大厅里的风险资本家,或者拥有大量CD目录的人。

I judge from the existence of ''shelve'' and ''pickle'' modules, and
relational database packages, that the problem I am addressing is not
rare. It could be the millionaire investor across the street, the
venture capitalist down the hall, or the guy with a huge CD catalog.


Castironpi,你*使用这个概念验证模块做什么?
Castironpi, what do *you* use this proof-of-concept module for?



老实说,还没有。我刚刚写了。我的用户社区和

的客户群非常小。最初,我想在一个文件中存储可变的

长度的字符串,其中货架和数据库都是矫枉过正的。

我为它的美丽创造了它,很抱歉让人失望。 />

Honestly, nothing yet. I just wrote it. My user community and
customer base are very small. Originally, I wanted to store variable-
length strings in a file, where shelves and databases were overkill.
I created it for its beauty, sorry to disappoint.


不要

打扰告诉我们您的想法*我们*应该使用它。告诉我们你使用它的原因是什么,或者至少是其他人使用它的原因。如果这只是一个你认为很酷的模块,我不喜欢你有机会照顾他们。并不缺少酷的东西。对于任何东西都没用的软件

,与眼睛糖果不同,没有人会因为喜欢算法而使用你的模块


Don''t
bother tell us what you think *we* should use it for. Tell us what you''re
using it for, or at least what somebody else is using it for. If this is
just a module that you think will be cool, I don''t like your chances of
people caring. There is no shortage of "cool" software that isn''t useful
for anything, and unlike eye-candy, nobody is going to use your module
just because they like the algorithm.



不幸的是,没有人会关心我的大部分用途

因为它直到我有工作。我正在玩弄笔记本电脑,

记得当我的数据库教授不停地把球扔到

VARCHARs上时。如果你想要一个声音字节,请想一想,想象编程

没有''new''和''malloc''。

Unfortunately, nobody is going to care about most of the uses I have
for it ''til I have a job. I''m goofing around with a laptop,
remembering when my databases professor kept dropping the ball on
VARCHARs. If you want a sound byte, think, "imagine programming
without ''new'' and ''malloc''."


如果你没有该软件的现有应用程序,那么请解释

它的功能(而不是如何)并对性能有所了解(它是alpha的? />
并用Python编写并且速度很慢,但我会用C重新编写它并且

期望它在10GB文件中随机访问每个

毫秒,或者其他什么)。你可能很幸运并且有人说

嘿,那只是我解决问题所需的工具!。
If you don''t have an existing application for the software, then explain
what it does (not how) and give some idea of the performance ("it''s alpha
and written in Python and really slow, but I will re-write it in C and
expect it to make a billion random accesses in a 10GB file per
millisecond", or whatever). You might be lucky and have somebody say
"Hey, that''s just the tool I need to solve my problem!".



我写了一个Rope实现来测试驱动它。它超过了2兆的

本机不可变字符串类型。它使用''struct''代替

''ctypes'',因此这个数字可能会降下来。我打算用b $ b把它留在纯Python中,所以那里。

I wrote a Rope implementation just to test drive it. It exceeded the
native immutable string type at 2 megs. It used ''struct'' instead of
''ctypes'', so that number could conceivably come down. I am intending
to leave it in pure Python, so there.


-

史蒂文
--
Steven



快乐聊天,先生。

Pleasure chatting as always sir.


Steven D''Aprano写道:
Steven D''Aprano wrote:

你已经创建了一个问题的解决方案,这个问题(可能)只影响了很少的人,至少从你的用例来判断。谁拥有

a 4GB XML文件
You''ve created a solution to a problem which (probably) only affects a
very small number of people, at least judging by your use-cases. Who has
a 4GB XML file



从日志流程或数据库中获取4GB XML文件

将它们的输出呈现为XML并不常见。它们通常以记录为导向,并且打算作为流处理。并且给了

正确的工具,这样做并不比对4GB

文本文件做同样的事情。


< ; / F>

Getting 4GB XML files from, say, logging processes or databases that can
render their output as XML is not that uncommon. They''re usually
record-oriented, and are intended to be processed as streams. And given
the right tools, doing that is no harder than doing the same to a 4GB
text file.

</F>


2008年9月10日星期三09:26:20 +0200,Fredrik Lundh写道:
On Wed, 10 Sep 2008 09:26:20 +0200, Fredrik Lundh wrote:

Steven D''Aprano写道:
Steven D''Aprano wrote:

>你已经创建了一个问题的解决方案,它可能只会影响一个<很少人,至少从您的用例来判断。谁拥有4GB XML文件
>You''ve created a solution to a problem which (probably) only affects a
very small number of people, at least judging by your use-cases. Who
has a 4GB XML file



从日志流程或数据库中获取4GB XML文件,这些文件可以是
渲染他们的输出为XML并不常见。它们通常以记录为导向,并且打算作为流处理。并且给予

正确的工具,这样做并不比对4GB

文本文件做同样困难。


Getting 4GB XML files from, say, logging processes or databases that can
render their output as XML is not that uncommon. They''re usually
record-oriented, and are intended to be processed as streams. And given
the right tools, doing that is no harder than doing the same to a 4GB
text file.



足够公平,这是一个好点。


但是你期望随机访问4GB的XML文件吗?如果我已经了解了Castironpi正在尝试的价值,那么他的主要用例是人们想要的话。

-

史蒂文


Fair enough, that''s a good point.

But would you expect random access to a 4GB XML file? If I''ve understood
what Castironpi is trying for, his primary use case was for people
wanting exactly that.
--
Steven


这篇关于Re:动态分配文件缓冲区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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