some small changes in my claude-gmp branch:
* fixed the crash at long double (which turned out to be a stack overflow) by increasing stack size to 64MB (from 32MB)
* long double code updated to kalles upstream
* compiled into one exe, no need for separate dll for long double any more
* no -msse2 (should be enabled by default on x86_64/amd64 anyway)
* no -march=native (not suitable for distributing binaries)
* does use -ffast-math, though I didn't benchmark its effect
fresh binary:
https://mathr.co.uk/mandelbrot/kf-2.11.1%2Bgmp.20170313.ziphttps://mathr.co.uk/mandelbrot/kf-2.11.1%2Bgmp.20170313.zip.sigadditional benchmarks:
* Newton-Raphson zooming is significantly faster with GMP: zooming into center pixel of glitch33.kfr (e1277) calculates new location in
18 seconds as opposed to over
4 minutes with kf-2.11.1
* rendering is significantly faster with GMP at deep enough zooms: Dinkydau's hyperbolic tiling pistil location (e2293, 640x360) takes
3 hours with upstream kf-2.11.1, with GMP it takes
1 hour 18 minutes, plus an additional 10 minutes if compiled to use MPFR instead of GMP.
EDITED to add: there are some warnings that are concerning with respect to 64bit safety - it seems to work, but chances are some address space layout changes could make it explode? I don't know what Microsoft Windows guarantees, but there exist functions like SetClassLongPtr which should be used instead of SetClassLong for pointers (which are 64bit on 64bit...). Here's the warning dump:
fraktal_sft/listbox.cpp: In function ‘int SubclassListProc(HWND, UINT, WPARAM, LPARAM)’:
fraktal_sft/listbox.cpp:14:62: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
CListBox*pList = (CListBox*)GetWindowLong(hWnd,GWL_USERDATA);
^
fraktal_sft/listbox.cpp:19:62: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
CListBox*pList = (CListBox*)GetWindowLong(hWnd,GWL_USERDATA);
^
fraktal_sft/listbox.cpp:24:62: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
CListBox*pList = (CListBox*)GetWindowLong(hWnd,GWL_USERDATA);
^
fraktal_sft/listbox.cpp:28:62: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return CallWindowProc((WNDPROC)GetClassLong(hWnd,GCL_WNDPROC),hWnd,uMsg,wParam,lParam);
^
fraktal_sft/listbox.cpp: In constructor ‘CListBox::CListBox(HWND, HWND, char*, int, COLORREF, COLORREF, BOOL)’:
fraktal_sft/listbox.cpp:108:44: warning: cast from ‘CListBox*’ to ‘LONG {aka long int}’ loses precision [-fpermissive]
SetWindowLong(m_hwList,GWL_USERDATA,(LONG)this);
^~~~
fraktal_sft/listbox.cpp:109:43: warning: cast from ‘int (*)(HWND, UINT, WPARAM, LPARAM) {aka int (*)(HWND__*, unsigned int, long long unsigned int, long long int)}’ to ‘LONG {aka long int}’ loses precision [-fpermissive]
SetWindowLong(m_hwList,GWL_WNDPROC,(LONG)SubclassListProc);
^~~~~~~~~~~~~~~~
fraktal_sft/listbox.cpp: In constructor ‘CListBoxEdit::CListBoxEdit(HWND, HWND, HWND, HWND, HWND, HWND__**, int)’:
fraktal_sft/listbox.cpp:250:35: warning: cast from ‘HWND {aka HWND__*}’ to ‘int’ loses precision [-fpermissive]
m_stEdits.AddInt((int)phwEdits[i]);
^
fraktal_sft/listbox.cpp: In member function ‘int CListBoxEdit::ProcessMessage(HWND, UINT, WPARAM, LPARAM)’:
fraktal_sft/listbox.cpp:259:54: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
nLen+=GetWindowTextLength((HWND)atoi(m_stEdits[i]))+1;
^
fraktal_sft/listbox.cpp:265:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
GetClassName((HWND)atoi(m_stEdits[i]),szClass,sizeof(szClass));
^
fraktal_sft/listbox.cpp:267:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
itoa(SendMessage((HWND)atoi(m_stEdits[i]),BM_GETCHECK,0,0),szTmp+strlen(szTmp),10);
^
fraktal_sft/listbox.cpp:269:44: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
GetWindowTextA((HWND)atoi(m_stEdits[i]),szTmp+strlen(szTmp),nLen+1);
^
fraktal_sft/listbox.cpp:284:54: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
nLen+=GetWindowTextLength((HWND)atoi(m_stEdits[i]))+1;
^
fraktal_sft/listbox.cpp:290:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
GetClassName((HWND)atoi(m_stEdits[i]),szClass,sizeof(szClass));
^
fraktal_sft/listbox.cpp:292:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
itoa(SendMessage((HWND)atoi(m_stEdits[i]),BM_GETCHECK,0,0),szTmp+strlen(szTmp),10);
^
fraktal_sft/listbox.cpp:294:44: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
GetWindowTextA((HWND)atoi(m_stEdits[i]),szTmp+strlen(szTmp),nLen+1);
^
fraktal_sft/listbox.cpp:322:42: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
GetClassName((HWND)atoi(m_stEdits[i]),szClass,sizeof(szClass));
^
fraktal_sft/listbox.cpp:324:42: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
SendMessage((HWND)atoi(m_stEdits[i]),BM_SETCHECK,atoi(stT[0][i+1]),0);
^
fraktal_sft/listbox.cpp:326:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
SetWindowTextA((HWND)atoi(m_stEdits[i]),stT[0][i+1]);
^
fraktal_sft/main.cpp: In function ‘long int ShowProc(HWND, UINT, WPARAM, LPARAM)’:
fraktal_sft/main.cpp:754:62: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return CallWindowProc((WNDPROC)GetClassLong(hWnd,GCL_WNDPROC),hWnd,uMsg,lParam,wParam);
^
fraktal_sft/main.cpp: In function ‘int CustomZoomSize(HWND, UINT, WPARAM, LPARAM)’:
fraktal_sft/main.cpp:3157:56: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
char *szTmp = (char*)GetWindowLong(hWnd,GWL_USERDATA);
^
fraktal_sft/main.cpp: In function ‘int SkewProc(HWND, UINT, WPARAM, LPARAM)’:
fraktal_sft/main.cpp:3455:57: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
HWND hwParent = (HWND)GetWindowLong(hWnd,GWL_USERDATA);
^
fraktal_sft/main.cpp:3666:56: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
HWND hwParent = (HWND)GetWindowLong(hWnd,GWL_USERDATA);
^
common/FolderBrowser.cpp: In function ‘int lpfnEdit(HWND, UINT, WPARAM, LPARAM)’:
common/FolderBrowser.cpp:66:62: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return CallWindowProc((WNDPROC)GetClassLong(hWnd,GCL_WNDPROC),hWnd,uMsg,wParam,lParam);
^
common/FolderBrowser.cpp: In function ‘int Browse(HWND, char*, int)’:
common/FolderBrowser.cpp:102:40: warning: cast from ‘LPITEMIDLIST {aka _ITEMIDLIST*}’ to ‘int’ loses precision [-fpermissive]
int nRet = (int)SHBrowseForFolderA(&bi);
^
common/FolderBrowser.cpp: In function ‘long int FilterProc(HWND, UINT, WPARAM, LPARAM)’:
common/FolderBrowser.cpp:114:62: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return CallWindowProc((WNDPROC)GetClassLong(hWnd,GCL_WNDPROC),hWnd,uMsg,wParam,lParam);
^
common/FolderBrowser.cpp: In function ‘int lpfnCallBack2(HWND, UINT, WPARAM, LPARAM)’:
common/FolderBrowser.cpp:132:41: warning: cast from ‘long int (*)(HWND, UINT, WPARAM, LPARAM) {aka long int (*)(HWND__*, unsigned int, long long unsigned int, long long int)}’ to ‘LONG {aka long int}’ loses precision [-fpermissive]
SetWindowLong(hEdit,GWL_WNDPROC,(LONG)FilterProc);
^~~~~~~~~~
common/FolderBrowser.cpp: In function ‘int Browse(HWND, char*, int, char*, char*, int)’:
common/FolderBrowser.cpp:160:39: warning: cast from ‘LPITEMIDLIST {aka _ITEMIDLIST*}’ to ‘int’ loses precision [-fpermissive]
int nRet = (int)SHBrowseForFolder(&bi);
^
common/StringVector.cpp: In member function ‘char* CStringVektor::GetString(int, int*)’:
common/StringVector.cpp:439:29: warning: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
return m_pszStrings[nIndex]?m_pszStrings[nIndex]:"";
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
common/tooltip.cpp: In function ‘long int ToolTipProc(HWND, UINT, WPARAM, LPARAM)’:
common/tooltip.cpp:153:28: warning: cast from ‘HWND {aka HWND__*}’ to ‘int’ loses precision [-fpermissive]
wsprintf(szTmp,"%d",(int)hw);
^~
common/tooltip.cpp: In function ‘void CollectObjects(HWND, HWND, LPARAM)’:
common/tooltip.cpp:226:52: warning: cast from ‘HWND {aka HWND__*}’ to ‘int’ loses precision [-fpermissive]
g_stWindows.AddInt(g_stWindows.GetCount()-1,(int)hwNext);
^~~~~~
common/tooltip.cpp:227:52: warning: cast from ‘HWND {aka HWND__*}’ to ‘int’ loses precision [-fpermissive]
g_stWindows.AddInt(g_stWindows.GetCount()-1,(int)hwParent);
^~~~~~~~
common/tooltip.cpp: In function ‘void ExitToolTip(HWND)’:
common/tooltip.cpp:283:36: warning: cast from ‘HWND {aka HWND__*}’ to ‘int’ loses precision [-fpermissive]
if(atoi(g_stWindows[i][1])==(int)hWnd)
^~~~