Hi there,
I was wondering if anyone had experience with File I/O in Java vs. C/C+
+ using mmap(),
and knew if the performance was better in one that the other, or more
or less negligible.
My instinct would say C/C++ is faster, but Java has made some
improvements with its
FileChannel class.
The situation is that a 1GB is to be loaded into memory and indexed as
the user needed.
thanks!
brigit. 2 2759
On Feb 27, 8:18 am, beejisbri...@gmail.com wrote:
Hi there,
I was wondering if anyone had experience with File I/O in Java vs. C/C+
+ using mmap(),
and knew if the performance was better in one that the other, or more
or less negligible.
My instinct would say C/C++ is faster, but Java has made some
improvements with its
FileChannel class.
The situation is that a 1GB is to be loaded into memory and indexed as
the user needed.
Memory mapping is OS specific.
Any support for memory mapping is a compiler extension and not
directly supported by the C language per se.
Probably, you want news:comp.unix.programmer.
Of course, you'll read their FAQ first: http://www.erlenstar.demon.co.uk/unix/ be**********@gmail.com wrote:
Hi there,
I was wondering if anyone had experience with File I/O in Java vs. C/C+
+ using mmap(),
and knew if the performance was better in one that the other, or more
or less negligible.
My instinct would say C/C++ is faster, but Java has made some
improvements with its
FileChannel class.
The situation is that a 1GB is to be loaded into memory and indexed as
the user needed.
thanks!
brigit.
There's no such language called 'C/C++'. The C and C++ languages
differ in subtle but important ways. Though they have a shared
history, they're better thought of as similar but distinct languages
rather than as "C/C++."
Now coming to your question, though I don't know about Java, but C and
C++ don't provide any native support for memory-mapped I/O. It's more
a facility of the underlying operating system and it's relative
performance is probably dependant on a lot of disparate factors, over
which the languages themselves are likely to have little, if any,
control. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Hao Xu |
last post by:
Hi everyone!
I found that if you want to write to the memory got by mmap(), you have
to get the file descriptor for mmap() in O_RDWR mode. If you got the
file descriptor in O_WRONLY mode, then...
|
by: Fabiano Sidler |
last post by:
Hi folks!
I created an mmap object like so:
--- snip ---
from mmap import mmap,MAP_ANONYMOUS,MAP_PRIVATE
fl = file('/dev/zero','rw')
mm = mmap(fl.fileno(), 1, MAP_PRIVATE|MAP_ANONYMOUS)
---...
|
by: beejisbrigit |
last post by:
Hi there,
I was wondering if anyone had experience with File I/O in Java vs. C++
using mmap(),
and knew if the performance was better in one that the other, or more
or less negligible.
My...
|
by: James T. Dennis |
last post by:
I've been thinking about the Python mmap module quite a bit
during the last couple of days. Sadly most of it has just been
thinking ... and reading pages from Google searches ... and
very little...
|
by: koara |
last post by:
Hello all,
i am using the mmap module (python2.4) to access contents of a file.
My question regards the relative performance of mmap.seek() vs
mmap.tell(). I have a generator that returns...
|
by: Neal Becker |
last post by:
On linux, I don't understand why:
f = open ('/dev/eos', 'rw')
m = mmap.mmap(f.fileno(), 1000000, prot=mmap.PROT_READ|mmap.PROT_WRITE,
flags=mmap.MAP_SHARED)
gives 'permission denied', but...
|
by: Kris Kennaway |
last post by:
If I do the following:
def mmap_search(f, string):
fh = file(f)
mm = mmap.mmap(fh.fileno(), 0, mmap.MAP_SHARED, mmap.PROT_READ)
return mm.find(string)
def mmap_is_in(f, string):
fh =...
|
by: Gabriel Genellina |
last post by:
En Thu, 29 May 2008 19:17:05 -0300, Kris Kennaway <kris@FreeBSD.org>
escribió:
Looks like you should define the sq_contains member in mmap_as_sequence,
and the type should have the...
|
by: magnus.lycka |
last post by:
Does anyone recognize this little Python crasher?
I'll file a bug report unless someone notices it as an already
documented bug. I found some open mmap bugs, but it wasn't
obvious to me that...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |