473,387 Members | 1,388 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Writing CPU Emulator in C++ language

I did a lot of research on the internet. There are many discussions.
The discussion states that writing class with pointer to member function in
C++ language is the wrong language. Some say to use C language or assembly
language if programmers want high performance for CPU emulator. They need
to make a choice to use switch table or pointer to function table. The
pointer to function table is the fastest performance, but switch table is
little slower.
If I want to use C++ language to write CPU emulator, I am told to use
namespace with data member and function member. The traditional pointer to
function outside of class is faster than pointer to member function inside
class. The object oriental programming is less use if you use namespace.
If I truly want to use class instead of namespace, the option is to use
switch table with member function list inside class.
Can you please advise me which namespace or class is chosen? I did find
out that pointer to member function is rarely used.
Jun 27 '08 #1
2 3173
Immortal Nephi wrote:
The pointer to function table is the fastest performance, but switch table is
little slower.
Source? I would think it's the other way round.
Jun 27 '08 #2
On Jun 16, 2:32 pm, Matthias Buelow <m...@incubus.dewrote:
Immortal Nephi wrote:
The pointer to function table is the fastest performance,
but switch table is little slower.
Source? I would think it's the other way round.
I would think it would depend on the compiler, the degree of
optimization requested, and the underlying architecture.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mark Irvine | last post by:
Hi, I recently upgraded to anAMD64 3400 and installed XP SP2. Unpon trying to run a smart application on the emulator, I recieved and error message: "Emulator for Windows CE One or more...
15
by: Douglas Garstang | last post by:
All, I posted a newsgroup question here a few weeks back, asking some questions that related to my 10 year quest (so far) to understand pointers. Someone suggested I write a simple emulator....
2
by: Stuart Ferguson | last post by:
Hi All, I am currently developing software for a Windows CE PC which i currently dont have the hardware, thus I am using the emulator for VS2003. The software writes out Timesheet entries to...
4
by: mac | last post by:
I have a petty basic machine: Win XP 1GB RAM AMD 3500+ Chip (2.2 Mhz) I just did a single form "Hello World" application and tried to debug. It took 20 seconds to deploy to the emulator. The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.