 |
Problema optimizacii |
 |
25.03.2003, 05:39
|
#1
|
Авик
Join Date: 07 2002
Location: Yerevan
Age: 38
Posts: 1,348
Rep Power: 0
|
Problema optimizacii
Kak na Visual C++, Basic sdelat progu malenkoj,bistroj
(derektivi kompiljatora)
|
|
|
25.03.2003, 07:50
|
#2
|
»
Join Date: 01 2002
Posts: 777
Rep Power: 0
|
Project->Settings(Alt+F7)->C/C++->Optimizations
|
|
|
25.03.2003, 09:58
|
#3
|
Грустно...
Join Date: 08 2002
Location: Там, где всегда идут дожди
Age: 43
Posts: 21,717
Rep Power: 9
|
Отмечу, что еще надо хорошо писать программы. Возможно это не поможет с размером, но уж точно поможет со скоростью. Хотя run time size - тоже очень зависит от того, как программа написанна.
|
|
|
 |
Re: Problema optimizacii |
 |
25.03.2003, 13:21
|
#4
|
Авик
Join Date: 07 2002
Location: Yerevan
Age: 38
Posts: 1,348
Rep Power: 0
|
Re: Problema optimizacii
Spasibo ogromnoe a kak dlja vb?
|
|
|
25.03.2003, 14:01
|
#5
|
Академик
Join Date: 09 2001
Location: inside myself
Posts: 5,369
Rep Power: 6
|
продуманный алгоритм + _ограничение_ себя в использовании MFC-шных классов + знание (внутренней работы) системы, для которой пишется софт.
залог успеха в любой среде программирования, имхо.
__________________
И повешенные могут качаться в неположенную сторону. /С.Е.Лец/
|
|
|
 |
Re: Re: Problema optimizacii |
 |
25.03.2003, 14:42
|
#6
|
Грустно...
Join Date: 08 2002
Location: Там, где всегда идут дожди
Age: 43
Posts: 21,717
Rep Power: 9
|
Re: Re: Problema optimizacii
Quote:
Originally posted by CyberJoe
Spasibo ogromnoe a kak dlja vb?
|
Учитывая то, что VB является интерпретируемым языком я думаю, что об оптимизации по скорости говорить не имеет особого смысла. С другой стороны файлы VB - по размеру очень маленькие, правда с ними нужны тяжелые VBRun длл-ки. Вот....
мое собственное ИМХО
|
|
|
 |
Re: Problema optimizacii |
 |
26.03.2003, 07:01
|
#7
|
Авик
Join Date: 07 2002
Location: Yerevan
Age: 38
Posts: 1,348
Rep Power: 0
|
Re: Problema optimizacii
Quote:
Originally posted by CyberJoe
Kak na Visual C++, Basic sdelat progu malenkoj,bistroj
(derektivi kompiljatora)
|
Nu ja naprimer w journale xakep chital (kak piast trojan na c++)
dam bilo para zagadochnix strochek kotorie umenshali
progu do 1kb!!!
nu a algoritm ja starajus pisat akkuratno.
|
|
|
26.03.2003, 08:14
|
#8
|
Академик
Join Date: 09 2001
Location: inside myself
Posts: 5,369
Rep Power: 6
|
2 CyberJoe: privedesh' eti zagadocnye stroki zdes' ?
interesno budet posmotret'.
__________________
И повешенные могут качаться в неположенную сторону. /С.Е.Лец/
|
|
|
26.03.2003, 08:22
|
#9
|
»
Join Date: 01 2002
Posts: 777
Rep Power: 0
|
загадочные строчки-это опции линкера типа
#pragma comment(linker,"...")
|
|
|
31.03.2003, 05:53
|
#10
|
Авик
Join Date: 07 2002
Location: Yerevan
Age: 38
Posts: 1,348
Rep Power: 0
|
Quote:
Originally posted by Greco
2 CyberJoe: privedesh' eti zagadocnye stroki zdes' ?
interesno budet posmotret'.
|
На смотри и радвуйся!
#pragma comment(linker,"/MERGE:.rdata=.text")
#pragma comment(linker,"/FILEALIGN:512 /SECTION:.text,EWRX
/IGNORE:4078")
#pragma comment(linker,"/ENTRY:WinMain")
__________________
вот собственно все, что я хотел сказать.
|
|
|
31.03.2003, 06:49
|
#11
|
Академик
Join Date: 09 2001
Location: inside myself
Posts: 5,369
Rep Power: 6
|
интересными являются опции:
#pragma comment(linker,"/MERGE:.rdata=.text")
#pragma comment(linker,"/FILEALIGN:512 /SECTION:.text...
а кто может мне объяснить влияние этих двух опций :-?
__________________
И повешенные могут качаться в неположенную сторону. /С.Е.Лец/
|
|
|
 |
|
 |
31.03.2003, 07:27
|
#12
|
»
Join Date: 01 2002
Posts: 777
Rep Power: 0
|
/MERGE:from=to
This option combines the first section (from) with the second section (to), naming the resulting section to. If the second section does not exist, LINK renames the section from as to.
The .text section is where all general-purpose code emitted by the compiler
or assembler ends up.
The .rdata section is used for at least four things. First, in EXEs produced by
Microsoft Link, the .rdata section holds the debug directory
The second useful portion of an .rdata section is the description string. If
you specified a DESCRIPTION entry in your program's .DEF file, the specified
description string appears in the .rdata section.
A third use of the .rdata section is for GUIDs used in OLE programming.
The UUID.LIB import library contains a collection of 16-byte GUIDs that are
used for things such as interface IDs. These GUIDs end up in the EXE or
DLL's .rdata section.
The final use of the .rdata section is as a place to put the
TLS (Thread Local Storage) directory. The TLS directory is a special data
structure used by the compiler runtime library to transparently provide thread
local storage for variables declared in program code.
/SECTION:name,attributes
This option changes the attributes of a section, overriding the attributes set when the .OBJ file for the section was compiled.
|
|
|
 |
All times are GMT. The time now is 08:40. |
|
|