Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

VC Delphi ÄÚ´æËÙ¶È±È½Ï - VC/MFC / ·Ç¼¼ÊõÀà

VC ¿ØÖÆ̨³ÌÐò:

#include <iostream>

using namespace std;

int main()
{
const int def_buffer = 1024 * 4;
DWORD t;
BYTE b[def_buffer];
memset(b, 0, sizeof(b));
PBYTE p;
t = GetTickCount();
for(int i = 0; i < 1000000; i++)
{
PBYTE p = new BYTE[def_buffer];
memcpy(p, b, def_buffer);
delete []p;
}
t = GetTickCount() - t;
cout << "ºÄʱ = " << t << endl;
system("PAUSE");
return 0;
}


Delphi ¿ØÖÆ̨³ÌÐò:

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils, Windows;

const
  buf_size = 1024 * 4;

var
  i: Integer;
  t: Cardinal;
  a: array[0..buf_size-1] of byte;
  p: PByte;
begin
  FillChar(a, sizeof(a), 0);
  t := GetTickCount();
  for i := 1 to 1000000 do
  begin
  GetMem(p, buf_size);
  Move(a, p^, buf_size);
  FreeMem(p);
  end;
  t := GetTickCount() - t;
  Writeln('ºÄʱ = ', t);
  Readln;
end.

²âÊÔ½á¹û:
VC ÏÔʾ 1400×óÓÒ
Delphi 7: 700-800 ×óÓÒ


vc Óиü¿ìµÄÄÚ´æ·ÖÅäºÍ¿¼±´º¯ÊýÂð?
VC2008 Release °æ±¾

ʹÓÃRelease°æ±¾½øÐÐÓÅ»¯...

ÔõôÓÅ»¯?

->ÉèÖÃ->c/c++ÀïÃ


Ïà¹ØÎÊ´ð£º

delphi編寫×Ô動¸üгÌÐò

ÓÉÓÚ¿Í戶¶ËÓеÄÎļþ經³£¸üУ¨遠³ÌµÄ£¬²»ÊǾÖÓò網£©£¬
ËùÒÔÏë寫個×Ô動¸üÐ嵀 ³ÌÐò¡£
¿´網É쵀 ·½·¨資ÁÏ£¬ÖªµÀЩ·½·¨£¬µ«²»ÖªµÀ¾ß體Ôõô寫¡£
......

delphi動態調ÓÃdllµÄÀ§»ó

procedure RunFunction;  
  type  
  TFunc = function(A: Integer): Integer;stdcall;¡¡//ÕâÀï¸ù¾ÝDLLÀïÃ溯ÊýµÄÉùÃ÷ÐÞ¸Ä  
  var  
  ......

´ó¼Ò¾õµÃÓÃdelphi×öÀàËÆ¿áÎÒÒôÀֺеÄÈí¼þ¿ÉÐÐÐÔÈçºÎ£¿

ÓÐʲô¹¹ÏëÌÖÂÛһϡ£
ÕâÀණÎ÷Ö÷ÒªÊÇÈËÆøºÍ½çÃ滨ÉÚ,¼¼ÊõÉÏûʲôÄѵã.

ÕâÎÒÖªµÀ£¬ÄǼ¼ÊõÉϵÄÄØ£¿ÓÐûÓй¹ÏëһϸÃÔõôÉè¼Æ£¿Ö÷ÒªÊÇdelphi×ÔÉíÄܲ»Äܹ»Íê³É£¬Èôͬʱ´óÁ¿¿Í»§µÇ½£¬·´Ó¦ËÙ¶ÈÈçºÎµÈµÈ¡£

ÒýÓÃ ......

¸ß·ÖÇó¾È£¬delphiдµÄdll·´±àÒëÎÊÌâ

ÓÃDEDE´ò¿ªÒ»¸öDLL£¬ÕÒµ½ÐèÒªµÄº¯ÊýÁË£¬µ«ÊÇÏÔʾµÄ¶¼ÊÇ»ã±à´úÂ룬¿´²»¶®£¬¿ÒÇë¸ßÊÖפ×ã°ïæ°¡£¡
ÊÇÒ»¸öKEYPRESSÏìÓ¦º¯Êý£¬¹¦ÄÜÊÇÔÚ°´ÏÂenterºóÅжÏÊäÈëµÄ×Ö·û£¬ÎÒÏë°´ÕÕ×Ô¼ºµÄÐèÇóÌøת£¬µ«ÊÇ
ÕÒ²»µ½Î»Ö㬸ßÊÖ ......

Çë½Ì¹ØÓÚDelphiµÄÊ÷Ðοؼþ

ÇëÎÊDelphiÓÐÊ÷ÐοؼþÂð£¿
ÔõÑùʹÓã¿
Ttreeview 
 treeview.items.addchild(nil(Éϼ¶½Úµã),'°¸·¢Ê±·¢'(text));

raize ¿Ø¼þ°üÀïÃæÓУ¬csdnÓÐÏÂÔصÄ

²é°ïÖúTTreeViewºÍTNodeÁ½¸öÀà

TTreeView ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ