![]() |
| [[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]] |
|
|
#1 |
|
DevMaster Editor
Join Date: Jan 2005
Posts: 54
|
Linear Optimization
Author: Nicolas Capens Description: The article focuses on the implementation of the back-end compiler that speeds up compilation time and also generates optimized code, which is especially applicable for shader compilation. |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Aug 2004
Location: Århus, Denmark
Posts: 688
|
Very nice article! I have actually been looking for something like this for my script compiler, so to see it land right under my nose was brilliant.
Have you considered implementing some kind of inlinening of functions, so that calls to the one-liner 'whatever()' function or something doesn't get called a billion times a second? I have implemented something i call native functions, which are basically engine functions you can define in your script, and when you call them from your script, they are executed in the engine, like 'operator *(matrix,vector)'. What I want to ask, is how would this work with your code, can I call engine-functions from my script through SoftWire, and have it run well?
___________________________________________
"Stupid bug! You go squish now!!" - Homer Simpson |
|
|
|
|
|
#3 | ||
|
Senior Member
Join Date: Aug 2004
Location: Ghent, Belgium
Posts: 1,056
|
Quote:
Quote:
Inlining is possible too. Instead of using the above call, just let SoftWire generate the code for the implementation of the function. |
||
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Aug 2004
Location: Århus, Denmark
Posts: 688
|
I Tried running your demo-app that comes the source code, and it crashed because windows XP SP2 doesn't allow this sort of thing to happen. Couldn't this be a problem for people who want to use Softwire in their own apps? Besides having to give it permission yourself, is there anything to do about it? What does the Java VM do with its JIT-compiled code?
I would also suggest that you change 'int' to 'void*' when passing function addresses, because the function pointer would be truncated from 64 to 32 bit on 64-bit processors, and that could chrash it.
___________________________________________
"Stupid bug! You go squish now!!" - Homer Simpson |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|