Post-1.6.0 performance

Discussion forum for Celestia developers; topics may only be started by members of the developers group, but anyone can post replies.
duds26
Posts: 328
Joined: 05.02.2007
Age: 29
With us: 12 years 5 months
Location: Europe

Re: Post-1.6.0 performance

Post #61by duds26 » 19.10.2009, 15:32

Thanks for answering, is this stuff a part of the C/C++ standard?

Avatar
selden
Developer
Posts: 10053
Joined: 04.09.2002
With us: 16 years 10 months
Location: NY, USA

Re: Post-1.6.0 performance

Post #62by selden » 19.10.2009, 16:07

I'm not sure which "stuff" you mean.

The C and C++ standards define the type of text you can put into the source code files.

The ways you invoke a compiler and tell it what to do with the souce code, and the types of binary codes that a compiler emits are unique to each compiler.
Selden

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 17
With us: 17 years 3 months
Location: Hamburg, Germany

Re: Post-1.6.0 performance

Post #63by t00fri » 19.10.2009, 17:37

selden wrote:...
The C and C++ standards define the type of text you can put into the source code files.

The ways you invoke a compiler and tell it what to do with the souce code, and the types of binary codes that a compiler emits are unique to each compiler.

?? :roll:

Fridger
Image

duds26
Posts: 328
Joined: 05.02.2007
Age: 29
With us: 12 years 5 months
Location: Europe

Re: Post-1.6.0 performance

Post #64by duds26 » 20.10.2009, 17:36

With stuff I meant the possibility, function to declare an architecture/instruction set and write architecture/instruction set specific instructions in the body.
(The architecture/instruction set specific instructions will obviously not be part of the standard.)

Avatar
selden
Developer
Posts: 10053
Joined: 04.09.2002
With us: 16 years 10 months
Location: NY, USA

Re: Post-1.6.0 performance

Post #65by selden » 20.10.2009, 18:47

duds26 wrote:With stuff I meant the possibility, function to declare an architecture/instruction set and write architecture/instruction set specific instructions in the body.
(The architecture/instruction set specific instructions will obviously not be part of the standard.)
The C and C++ language standards really don't specify anything about any particular architecture. The standards specify the contents of the source files -- what you have to write so numbers get added together, for example,

Code: Select all

c = a + b;
or what you write to invoke a mathematical function

Code: Select all

x = tan(theta);

The language standards specify some of the features that compilers must support (like the ability to call a subroutine), but not the details of how it is to be implemented in binary machine code. Each compiler vendor also adds their own special features to their compilers.

Most compilers are designed to run on a single architecture and generate code only for that architecture Some compilers (like the GNU compilers) are designed to be able to run on one architecture and generate code for some other architecture. This is called "cross compiling". The way you declare the architecture and instruction set to be used is unique to each compiler product. Gnu compilers do it one way. Commercial compilers usually have their own different techniques.

Some compilers, including the GNU compilers, make it possible to include architecture-specific assembly langage instructions in the middle of the C or C++ source code. This is not part of the language standards. Sometimes using assembly language is necessary when the code generated by the compiler isn't very good, but it's generally a very bad thing to do, since the resulting program can only run on one particular architecture.
Selden

duds26
Posts: 328
Joined: 05.02.2007
Age: 29
With us: 12 years 5 months
Location: Europe

Re: Post-1.6.0 performance

Post #66by duds26 » 21.10.2009, 19:54

...but not the details of how it is to be implemented in binary machine code."
That's fine and not what I asked.
My question about the standard would be able to define a place to put those instructions in and something to say: it's for this architecture

IF(this architecture){
<block of binary code>
}

(If nothing in else then there would stand an else with a empty body.)


Some compilers, including the GNU compilers, make it possible to include architecture-specific assembly langage instructions in the middle of the C or C++ source code. This is not part of the language standards. Sometimes using assembly language is necessary when the code generated by the compiler isn't very good, but it's generally a very bad thing to do, since the resulting program can only run on one particular architecture.

Being able to do an if(instruction set/architecture{<block of binary code/assembly language>}else{<source code>} construction would be handy.
The standard allowing to specify the name is enough for me. The details even don't have to be said because the compiler would just put the block of binary code in place without compiling if it's the same architecture. Else it would compile the source code in the else tag.

Avatar
selden
Developer
Posts: 10053
Joined: 04.09.2002
With us: 16 years 10 months
Location: NY, USA

Re: Post-1.6.0 performance

Post #67by selden » 22.10.2009, 12:36

Embedding hand-written architecture-specific code almost invariably turns out to be a very bad idea. Every compiler does it differently, and it is a maintenance nightmare.

Sometimes it can be justified when a program is written only for a specific architecture, will not be needing many changes, will only be compiled using a particular compiler, and there is no other way to meet the requirements of the project. None of these are the case for Celestia: it is written to run on many architectures, is constantly being changed and improved (although slowly), must be compilable by many different compilers, and there are invariably other ways to meet Celestia's requirements.
Selden

duds26
Posts: 328
Joined: 05.02.2007
Age: 29
With us: 12 years 5 months
Location: Europe

Re: Post-1.6.0 performance

Post #68by duds26 » 26.10.2009, 18:11

It is indeed a very bad idea and should be avoided.
Always, even if the conditions are generous.
(If you need to have something compiling can't provide, then it's worth doing something.)
Happy to see that Celestia will stay universal.

Avatar
selden
Developer
Posts: 10053
Joined: 04.09.2002
With us: 16 years 10 months
Location: NY, USA

Re: Post-1.6.0 performance

Post #69by selden » 11.07.2010, 00:18

Yesterday I replaced my 5 year old Pentium 4 tower computer with a modern core i7 laptop. The old system's motherboard had died.

New system specs:
8GB, 1.6GHz Core i7 Q720; Win 7 Pro 64bit
Nvidia NVS 3100M; ForceWare v189.74, OpenGL 3.1
display: 1920x1080.

I benchmarked it using the URLs Chris provided in the first post of this thread:

Celestia versions
1.6.0 | r5038
-------------
1 170 | 210
2 76 | 91
3 290 | 290
4 102 | 108
5 256 | 295

I ran Celestia in a maximum-sized desktop window, not in full screen mode.
The new system seems to be performing roughly half-way between my old system and what Chris has.

I built r5038 under Win 7 using VS 2008 sp1. Using the "Web install" procedure it automatically installed the right SDK without having to do it manually.

FWIW, after reading other people's reports of problems with Vista and Win7, I decided not to even try to install Celestia in Program Files. I created the directory C:\MyPrograms and installed Celestia v1.6.0 there instead (along with some other packages like MMPS and Anim8or). It runs with no problems whatsoever.
Selden

duds26
Posts: 328
Joined: 05.02.2007
Age: 29
With us: 12 years 5 months
Location: Europe

Re: Post-1.6.0 performance

Post #70by duds26 » 17.07.2010, 11:26

Using Windows Vista Home Premium 32bit
Have Celestia installed in Program Files and it works fine there.


Return to “Ideas & News”

Who is online

Users browsing this forum: 1 guest