-
-#if SIZEOF_INT <= 3 /* use long if int is smaller than 32 bits */
-typedef long varnumber_T;
-#else
-typedef int varnumber_T;
-#endif
+typedef int64_t varnumber_T;


In my opinion, this type of change is not acceptable.

If VIM is to be targetted for 32-bit platforms, it should have the option to
run with 32-bit wide types on those platforms for optimal performance.

64-bit wide types on 32-bit platforms cause 64-bit arithmetic emulation
to be performed on ALL integer-based calculations, impacting the speed
of such calculations, be it in-script variable access, loop control, etc.

The typedef should look like this:

#if sizeof(size_t) > 4 /* ANSI C only. need to change to cross-standard 64-bit test */
typedef int64_t varnumber_T;
#else
#if SIZEOF_INT<= 3 /* use long if int is smaller than 32 bits */
typedef long varnumber_T;
#else
typedef int varnumber_T;
#endif
#endif


Use of size_t is the best way in ANSI C to know the width of the system
bus as size_t must be able to reflect the size of the largest possible
addressable memory object (as returned by "malloc()").



On 06/01/14 15:34, mattn wrote:
https://gist.github.com/mattn/8278843

This is in progress.


--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui