자동차 보험 가격 비교 - 하이카 다이렉트 vs 삼성화재 애니카
동차 보험 가격 비교 - 하이카 다이렉트 vs 삼성화재 애니카
인터넷 가입기준입니다.
삼성화재 애니카가 약 3만원 정도 저렴하네요.
긴급견인 거리와 방법에 있어 약간 차이가 있으니, 주의하시기 바랍니다.
하이카 다이렉트
삼성화재 애니카
동차 보험 가격 비교 - 하이카 다이렉트 vs 삼성화재 애니카
인터넷 가입기준입니다.
삼성화재 애니카가 약 3만원 정도 저렴하네요.
긴급견인 거리와 방법에 있어 약간 차이가 있으니, 주의하시기 바랍니다.
하이카 다이렉트
삼성화재 애니카
왕소라형 과자
580kcal
1000원
평가 : 고열량 식품. 비상식량. 이에 자꾸 붙어서, 치아가 흔들릴듯...
코코넛 초코렛타
410.8kcal
1500원
평가 : 바나나킥에 초코렛 발라놓은....코코넛 가루가 약간 씹힘. 많이 비쌈.
로얄 초코쿠키
360kcal
1000원
평가 : 보통
에멘탈 치즈쿠키
370kcal
1000원
평가 : 모양 이쁨. 버터쿠키 맛, 몇개 안들어 있음. 구멍 슝슝 뚤린 치즈.
코코넛 쿠키
385kcal
1200원
평가 : 보통. 왜 비싼지 모르겠단...
당정, 한진해운에 장기저리자금 1천억+α지원…"담보 조건부"(종합) (0) | 2016.09.06 |
---|---|
모세의 기적? - 민폐랭킹 1위 (0) | 2016.07.31 |
갑작스런 심장마비, 살 수 있는 방법 (0) | 2016.07.28 |
"국가책임당" 창당 (0) | 2016.07.26 |
퓰리처 상을 받은 인터넷 신문이 있다? (0) | 2016.07.04 |
CPU 제조사, 모델명, 지원되는 기능을 볼 수 있습니다.
Vendor=GenuineIntel
Brand=Intel(R) Core(TM)2 Duo C6600 @ 2.20GHz
CLFSH
CMPXCHG16B
CX8
FXSR
LAHF
MMX
MONITOR
MSR
OSXSAVE
SEP
SSE
SSE2
SSE3
SSE4.1
SSSE3
XSAVE
A practical guide to SSE SIMD with C++
http://sci.tuomastonteri.fi/programming/sse
Intel SSE Tutorial : An Introduction to the SSE Instruction Set
http://neilkemp.us/src/sse_tutorial/sse_tutorial.html
C언어 컴파일 속도를 빠르게하는 방법 (0) | 2016.07.16 |
---|---|
strlen() 같은 기본 함수도 SIMD 명령으로 최적화할 수 있을까? (0) | 2016.06.02 |
VC++ 6.0을 쓰지 말아야하는 이유 (4) | 2016.05.03 |
한국형 CPU 코어 사업 첫 성과물 나온다 (0) | 2016.04.05 |
ARM Cortex M0 - W7500 인터럽트 (0) | 2016.03.07 |
VC++6.0에서 __cpuid, __cpuidex 함수를 사용할 수 없다는 글이 있어, 작성해보았다.
인터넷은 역시나 위대하다.
내가 생각한것은 그 누군가 먼저 생각한 사람이 있다.
안된다고 생각해보기전에, 한번 더 생각해보자.
"누가 ..하더라"와 같은 "카더라"통신은 맹신하지 말자.
http://stackoverflow.com/questions/1666093/cpuid-implementations-in-c
void __cpuid(int CPUInfo[4], int InfoType)
{
__asm
{
mov esi, CPUInfo
mov eax, InfoType
xor ecx, ecx
cpuid
mov dword ptr [esi + 0], eax
mov dword ptr [esi + 4], ebx
mov dword ptr [esi + 8], ecx
mov dword ptr [esi + 12], edx
}
}
void __cpuidex(int CPUInfo[4], int InfoType, int ECXValue)
{
__asm
{
mov esi, CPUInfo
mov eax, InfoType
mov ecx, ECXValue
cpuid
mov dword ptr [esi + 0], eax
mov dword ptr [esi + 4], ebx
mov dword ptr [esi + 8], ecx
mov dword ptr [esi + 12], edx
}
}
https://msdn.microsoft.com/ko-kr/library/hskdteyh.aspx
CPU정보(사용가능한 기능 목록)을 얻는 샘플을 VC++6.0에서 동작가능하도록 작성해보았다.
#ifndef __cpuid_H
#define __cpuid_H
//myj22000@naver.com
void __cpuid(int CPUInfo[4],int InfoType);
void __cpuidex(int CPUInfo[4],int InfoType,int ECXValue);
class CPU_InstructionSet_Internal
{
public:
int bisIntel;
int bisAMD;
char vendor[0x20];
char brand[0x40];
unsigned int f_1_ECX,f_1_EDX,f_7_EBX,f_7_ECX,nExIds,f_81_ECX,f_81_EDX;
CPU_InstructionSet_Internal();
};
#ifndef get_bit
#define get_bit(a,i) ((bool)(((a)>>(i))&1))
#endif
class CPU_InstructionSet
{
public:
CPU_InstructionSet_Internal m_cpu;
char *Vendor(void){return m_cpu.vendor;}
char *Brand(void){return m_cpu.brand;}
bool SSE3(void){return get_bit(m_cpu.f_1_ECX,0);}
bool PCLMULQDQ(void){return get_bit(m_cpu.f_1_ECX,1);}
bool MONITOR(void){return get_bit(m_cpu.f_1_ECX,3);}
bool SSSE3(void){return get_bit(m_cpu.f_1_ECX,9);}
bool FMA(void){return get_bit(m_cpu.f_1_ECX,12);}
bool CMPXCHG16B(void){return get_bit(m_cpu.f_1_ECX,13);}
bool SSE41(void){return get_bit(m_cpu.f_1_ECX,19);}
bool SSE42(void){return get_bit(m_cpu.f_1_ECX,20);}
bool MOVBE(void){return get_bit(m_cpu.f_1_ECX,22);}
bool POPCNT(void){return get_bit(m_cpu.f_1_ECX,23);}
bool AES(void){return get_bit(m_cpu.f_1_ECX,25);}
bool XSAVE(void){return get_bit(m_cpu.f_1_ECX,26);}
bool OSXSAVE(void){return get_bit(m_cpu.f_1_ECX,27);}
bool AVX(void){return get_bit(m_cpu.f_1_ECX,28);}
bool F16C(void){return get_bit(m_cpu.f_1_ECX,29);}
bool RDRAND(void){return get_bit(m_cpu.f_1_ECX,30);}
bool MSR(void){return get_bit(m_cpu.f_1_EDX,5);}
bool CX8(void){return get_bit(m_cpu.f_1_EDX,8);}
bool SEP(void){return get_bit(m_cpu.f_1_EDX,11);}
bool CMOV(void){return get_bit(m_cpu.f_1_EDX,15);}
bool CLFSH(void){return get_bit(m_cpu.f_1_EDX,19);}
bool MMX(void){return get_bit(m_cpu.f_1_EDX,23);}
bool FXSR(void){return get_bit(m_cpu.f_1_EDX,24);}
bool SSE(void){return get_bit(m_cpu.f_1_EDX,25);}
bool SSE2(void){return get_bit(m_cpu.f_1_EDX,26);}
bool FSGSBASE(void){return get_bit(m_cpu.f_7_EBX,0);}
bool BMI1(void){return get_bit(m_cpu.f_7_EBX,3);}
bool HLE(void){return m_cpu.bisIntel && get_bit(m_cpu.f_7_EBX,4);}
bool AVX2(void){return get_bit(m_cpu.f_7_EBX,5);}
bool BMI2(void){return get_bit(m_cpu.f_7_EBX,8);}
bool ERMS(void){return get_bit(m_cpu.f_7_EBX,9);}
bool INVPCID(void){return get_bit(m_cpu.f_7_EBX,10);}
bool RTM(void){return m_cpu.bisIntel && get_bit(m_cpu.f_7_EBX,11);}
bool AVX512F(void){return get_bit(m_cpu.f_7_EBX,16);}
bool RDSEED(void){return get_bit(m_cpu.f_7_EBX,18);}
bool ADX(void){return get_bit(m_cpu.f_7_EBX,19);}
bool AVX512PF(void){return get_bit(m_cpu.f_7_EBX,26);}
bool AVX512ER(void){return get_bit(m_cpu.f_7_EBX,27);}
bool AVX512CD(void){return get_bit(m_cpu.f_7_EBX,28);}
bool SHA(void){return get_bit(m_cpu.f_7_EBX,29);}
bool PREFETCHWT1(void){return get_bit(m_cpu.f_7_ECX,0);}
bool LAHF(void){return get_bit(m_cpu.f_81_ECX,0);}
bool LZCNT(void){return m_cpu.bisIntel && get_bit(m_cpu.f_81_ECX,5);}
bool ABM(void){return m_cpu.bisAMD && get_bit(m_cpu.f_81_ECX,5);}
bool SSE4a(void){return m_cpu.bisAMD && get_bit(m_cpu.f_81_ECX,6);}
bool XOP(void){return m_cpu.bisAMD && get_bit(m_cpu.f_81_ECX,11);}
bool TBM(void){return m_cpu.bisAMD && get_bit(m_cpu.f_81_ECX,21);}
bool SYSCALL(void){return m_cpu.bisIntel && get_bit(m_cpu.f_81_EDX,11);}
bool MMXEXT(void){return m_cpu.bisAMD && get_bit(m_cpu.f_81_EDX,22);}
bool RDTSCP(void){return m_cpu.bisIntel && get_bit(m_cpu.f_81_EDX,27);}
bool _3DNOWEXT(void){return m_cpu.bisAMD && get_bit(m_cpu.f_81_EDX,30);}
bool _3DNOW(void){return m_cpu.bisAMD && get_bit(m_cpu.f_81_EDX,31);}
};
char *get_CPU_InstructionStr(char *buf);
#endif
#include "__cpuid.h"
//#include <stdio.h>
//#include <Windows.h>
void __cpuid(int CPUInfo[4],int InfoType)
{
__asm
{
mov esi, CPUInfo
mov eax, InfoType
xor ecx, ecx
cpuid
mov dword ptr[esi+0], eax
mov dword ptr[esi+4], ebx
mov dword ptr[esi+8], ecx
mov dword ptr[esi+12], edx
}
}
void __cpuidex(int CPUInfo[4],int InfoType,int ECXValue)
{
__asm
{
mov esi, CPUInfo
mov eax, InfoType
mov ecx, ECXValue
cpuid
mov dword ptr[esi+0], eax
mov dword ptr[esi+4], ebx
mov dword ptr[esi+8], ecx
mov dword ptr[esi+12], edx
}
}
#include "STRING.H"
CPU_InstructionSet_Internal::CPU_InstructionSet_Internal()
{
unsigned int *p;int cpui[4];int number_of_the_function_ID;
vendor[0]=0;
brand[0]=0;
// Calling __cpuid with 0x0 as the function_id argument
// gets the number of the highest valid function ID.
__cpuid(cpui,0);
number_of_the_function_ID = cpui[0];
__cpuidex(cpui,0,0);
p=(unsigned int *)vendor;
p[0]=cpui[1];
p[1]=cpui[3];//순서주의
p[2]=cpui[2];
vendor[12]=0;
bisIntel=(strcmp(vendor,"GenuineIntel")==0);
bisAMD=(strcmp(vendor,"AuthenticAMD")==0);
// load bitset with flags for function 0x00000001
if (number_of_the_function_ID >= 1)
{
__cpuidex(cpui,1,0);
f_1_ECX = cpui[2];
f_1_EDX = cpui[3];
}
// load bitset with flags for function 0x00000007
if (number_of_the_function_ID >= 7)
{
__cpuidex(cpui,7,0);
f_7_EBX = cpui[1];
f_7_ECX = cpui[2];
}
// Calling __cpuid with 0x80000000 as the function_id argument
// gets the number of the highest valid extended ID.
__cpuid(cpui,0x80000000);
nExIds=(unsigned int)cpui[0];
// load bitset with flags for function 0x80000001
if (nExIds >= 0x80000001)
{
__cpuidex(cpui,0x80000001,0);
f_81_ECX = cpui[2];
f_81_EDX = cpui[3];
}
// Interpret CPU brand string if reported
if (nExIds >= 0x80000004)
{
p=(unsigned int *)brand;
__cpuidex((int*)&(brand[0]),0x80000002,0);
__cpuidex((int*)&(brand[16]),0x80000003,0);
__cpuidex((int*)&(brand[24]),0x80000004,0);
brand[12*4]=0;
}
};
#include "stdio.h"
/*
Vendor=GenuineIntel
Brand=Intel(R) Core(TM)2 Duo C6600 @ 2.20GHz
CLFSH
CMPXCHG16B
CX8
FXSR
LAHF
MMX
MONITOR
MSR
OSXSAVE
SEP
SSE
SSE2
SSE3
SSE4.1
SSSE3
XSAVE
*/
char *get_CPU_InstructionStr(char *buf)
{
CPU_InstructionSet cpu;char *p;
p=buf;
p+=sprintf(p,"Vendor=%s\r\n",cpu.Vendor());
p+=sprintf(p,"Brand=%s\r\n\r\n",cpu.Brand());
if(cpu._3DNOW())strcat(p,"3DNOW\r\n");
if(cpu._3DNOWEXT())strcat(p,"3DNOWEXT\r\n");
if(cpu.ABM())strcat(p,"ABM\r\n");
if(cpu.ADX())strcat(p,"ADX\r\n");
if(cpu.AES())strcat(p,"AES\r\n");
if(cpu.AVX())strcat(p,"AVX\r\n");
if(cpu.AVX2())strcat(p,"AVX2\r\n");
if(cpu.AVX512CD())strcat(p,"AVX512CD\r\n");
if(cpu.AVX512ER())strcat(p,"AVX512ER\r\n");
if(cpu.AVX512F())strcat(p,"AVX512F\r\n");
if(cpu.AVX512PF())strcat(p,"AVX512PF\r\n");
if(cpu.BMI1())strcat(p,"BMI1\r\n");
if(cpu.BMI2())strcat(p,"BMI2\r\n");
if(cpu.CLFSH())strcat(p,"CLFSH\r\n");
if(cpu.CMPXCHG16B())strcat(p,"CMPXCHG16B\r\n");
if(cpu.CX8())strcat(p,"CX8\r\n");
if(cpu.ERMS())strcat(p,"ERMS\r\n");
if(cpu.F16C())strcat(p,"F16C\r\n");
if(cpu.FMA())strcat(p,"FMA\r\n");
if(cpu.FSGSBASE())strcat(p,"FSGSBASE\r\n");
if(cpu.FXSR())strcat(p,"FXSR\r\n");
if(cpu.HLE())strcat(p,"HLE\r\n");
if(cpu.INVPCID())strcat(p,"INVPCID\r\n");
if(cpu.LAHF())strcat(p,"LAHF\r\n");
if(cpu.LZCNT())strcat(p,"LZCNT\r\n");
if(cpu.MMX())strcat(p,"MMX\r\n");
if(cpu.MMXEXT())strcat(p,"MMXEXT\r\n");
if(cpu.MONITOR())strcat(p,"MONITOR\r\n");
if(cpu.MOVBE())strcat(p,"MOVBE\r\n");
if(cpu.MSR())strcat(p,"MSR\r\n");
if(cpu.OSXSAVE())strcat(p,"OSXSAVE\r\n");
if(cpu.PCLMULQDQ())strcat(p,"PCLMULQDQ\r\n");
if(cpu.POPCNT())strcat(p,"POPCNT\r\n");
if(cpu.PREFETCHWT1())strcat(p,"PREFETCHWT1\r\n");
if(cpu.RDRAND())strcat(p,"RDRAND\r\n");
if(cpu.RDSEED())strcat(p,"RDSEED\r\n");
if(cpu.RDTSCP())strcat(p,"RDTSCP\r\n");
if(cpu.RTM())strcat(p,"RTM\r\n");
if(cpu.SEP())strcat(p,"SEP\r\n");
if(cpu.SHA())strcat(p,"SHA\r\n");
if(cpu.SSE())strcat(p,"SSE\r\n");
if(cpu.SSE2())strcat(p,"SSE2\r\n");
if(cpu.SSE3())strcat(p,"SSE3\r\n");
if(cpu.SSE41())strcat(p,"SSE4.1\r\n");
if(cpu.SSE42())strcat(p,"SSE4.2\r\n");
if(cpu.SSE4a())strcat(p,"SSE4a\r\n");
if(cpu.SSSE3())strcat(p,"SSSE3\r\n");
if(cpu.SYSCALL())strcat(p,"SYSCALL\r\n");
if(cpu.TBM())strcat(p,"TBM\r\n");
if(cpu.XOP())strcat(p,"XOP\r\n");
if(cpu.XSAVE())strcat(p,"XSAVE\r\n");
//printf(buf);
return buf;
}
1. 보다 안전한 프로그래밍
=>대부분의 프로그램은 보안이 필요없다. 일부 프로그램만 보안이 요구된다.
해커가 귀한 시간을 들여, 당신의 프로그램을 해킹할 이유는 매우 적어 보인다.
대부분 쓸데없는 걱정
2. 유니코드 프로그래밍
=>VC++ 6.0으로도 유니코드 프로그래밍을 할 수 있다.
3. 보다 뛰어난 인텔리센스
=>프로그램 작성에 큰 영향은 없다.
응용프로그램의 성능과는 관련이 없다.
4. STL의 (거의) 완벽한 지원
=>VC++6.0도 STL 사용할 수 있다.
나는 STL 사용안함.
5. 뛰어난 IDE 매크로 사용
=>장인이 연장탓을 하는듯...
응용프로그램의 성능과는 관련이 없다.
6. 더 훌륭해진 컴파일러
=>컴파일러가 훌륭해진다고, 당신의 프로그램도 크게 훌륭해지기는 어렵다.
7. 더 괜찮아진 IDE
=>프로그램 사용자는 IDE가 무엇인지 모른다.
VC++6.0을 사용하는 이유중에 하나는 최신 IDE가 너무 무겁기때문이다.
응용프로그램의 성능과는 관련이 없다.
8. 멀티 코어의 사용
=>프로그램에서 멀티코어를 사용하려면, 쓰레드로 돌리면 된다.
컴파일을 빠르게하려면, 라이브러리를 사용해라. 멀티코어 컴파일보다 훨씬 빠르다.
응용프로그램의 성능과는 관련이 없다.
9. MFC/ATL의 변화
=>VC++6.0의 MFC도 충분하다.나는 ALT은 사용하지 않는다.
10. __cpuid
=>대부분의 프로그램은 사용할 이유가 거의 없다.
게임, 그래픽, 오디오, 비디오등 고성능이 요구되는 프로그램에서 필요할 수 있다.(반드시 필요한 것은 아니다)
참조 : "VC++6.0에서 __cpuid, __cpuidex 함수 구현"
11. SIMD 명령
=>대부분의 프로그램은 사용할 이유가 거의 없다.
게임, 그래픽, 오디오, 비디오등 고성능이 요구되는 프로그램에서 필요하다.
어셈블러를 직접 입력하는 방식으로 프로그램이 가능해 보인다.
12. 64bit 프로그램
=>대부분의 프로그램은 사용할 이유가 거의 없다.
게임, 그래픽, 오디오, 비디오등 고성능이 요구되는 프로그램에서 필요하다.
아직까지는 32bit 프로그램이 호환성이 더 좋다(?)
strlen() 같은 기본 함수도 SIMD 명령으로 최적화할 수 있을까? (0) | 2016.06.02 |
---|---|
SSE SIMD link (0) | 2016.05.03 |
한국형 CPU 코어 사업 첫 성과물 나온다 (0) | 2016.04.05 |
ARM Cortex M0 - W7500 인터럽트 (0) | 2016.03.07 |
CMSIS-DAP (0) | 2016.03.07 |
//ASM코드를 직접 대입하는 방법
/*
15: void test_asm()
16: {
00401050 push ebp
00401051 mov ebp,esp
00401053 sub esp,40h
00401056 push ebx
00401057 push esi
00401058 push edi
00401059 lea edi,[ebp-40h]
0040105C mov ecx,10h
00401061 mov eax,0CCCCCCCCh
00401066 rep stos dword ptr [edi]
17: __asm {randasm}
00401068 dec edx
00401069 inc ebx
0040106A dec ebx
18: dec_edx;
0040106B dec edx
19: dec_edx;
0040106C dec edx
20: }
0040106D pop edi
0040106E pop esi
0040106F pop ebx
00401070 add esp,40h
00401073 cmp ebp,esp
00401075 call __chkesp (00401740)
0040107A mov esp,ebp
0040107C pop ebp
0040107D ret
*/
#define dec_edx __asm _emit 0x4A
#define inc_ebx __asm _emit 0x43
#define dec_ebx __asm _emit 0x4B
#define randasm __asm _emit 0x4A __asm _emit 0x43 __asm _emit 0x4B
void test_asm()
{
//__asm {randasm}
dec_edx;
inc_ebx;
dec_ebx;
}
왜 갑자기 태도를 바꾼것일까?
일부 사람들은, 이번 조선소 구조조정을 위해, 양적완화를 통해 세금을 투입하려고 한다고 하네요.
양적완화의 목적이 "조선업 살리기"라고 하는 의견이 있습니다.
양적완화할 경우, 물가가 오르고, 부동산 가격이 오르고, 주가도 오릅니다.
돈 가지고 계신 분들은 손해고, 부동산, 주식등의 실물을 가지고 계신 분들은 이득입니다.
국민의 대부분은 부동산이 없고, 몇천만원의 현금만 보유하고 있으므로, 국민 대부분이 손해를 볼 것입니다.
정부는 누구를 위한 정부인지 모르겠네요.
물론, 조선업이 망하면, 해당지역경제가 파탄이 나고, 그 영향이 다른 지역/부분에도 영향을 끼치는건 당연합니다.
그러나, 과거에도 세금투입으로 살려주었더니, 이익은 저들이 챙기는 행태를 보여왔다는게 일부 사람들의 의견입니다.
저 역시, 세금투입으로 살려봤자, 회생가능성이 없어보입니다.
차라리, 몇개의 조선소를 하나로 대통합하는게 나을지 모르겠습니다.
대부분의 국민들만 손해보는일을, 일부 국민을 위해 하는일은 바람직해 보이지 않습니다.
물론, 회생가능성이 있다면, 해볼만 하지만, 이경우에는 회생가능성은 없어 보입니다.
또한 그냥 돈을 주는게 아닌, 장기로 낮은 이자로 빌려주어야 합니다.(대부분 못받는건지, 안받는건지, 유야무야...)
우리나라도 산업구조를 다시 만들어야할 시기인듯 싶습니다.
조선업 살리기에 투입될 돈이 아니라, 조선업 구조조정에 투입되는것은 괜찮아 보입니다.
그러나, 구조조정 보다는 미래산업 구조개편에 세금을 투입하는게 미래에는 더 바람직해 보입니다.
//Lib는 ANSI,유니코드 모든 함수가 존재해야하며, APP에서 호출할때, 매크로에 의해, 적당한것이 선택된다.
//(Lib는 ANSI/유니코드 구분이 없다. 둘다 존재해야한다.물론, ANSI나 유니코드 중, 한가지만 사용할 경우에는 프로젝트 변경시, 라이브러리를 매번 다시 컴파일해야 할 수 있다.)
#if defined(_UNICODE) || defined(UNICODE)
#define sListCtlData4 sListCtlData4W
#define ListCtrl_MakeHeader4 ListCtrl_MakeHeader4W
#else
#define sListCtlData4 sListCtlData4A
#define ListCtrl_MakeHeader4 ListCtrl_MakeHeader4A
#endif