mirror of
				https://github.com/m00natic/vlfi.git
				synced 2025-10-30 22:53:37 +00:00 
			
		
		
		
	Workaround local maximum in batch tune.
This commit is contained in:
		
							
								
								
									
										10
									
								
								vlf-tune.el
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								vlf-tune.el
									
									
									
									
									
								
							| @@ -365,13 +365,17 @@ Suitable for multiple batch operations." | |||||||
|       (let ((max-idx (1- (/ (min vlf-tune-max |       (let ((max-idx (1- (/ (min vlf-tune-max | ||||||
|                                  (/ (1+ vlf-file-size) 2)) |                                  (/ (1+ vlf-file-size) 2)) | ||||||
|                             vlf-tune-step)))) |                             vlf-tune-step)))) | ||||||
|         (cond (linear (vlf-tune-linear types max-idx)) |         (if linear | ||||||
|               ((file-remote-p (or file buffer-file-name)) |             (vlf-tune-linear types max-idx) | ||||||
|  |           (let ((batch-size vlf-batch-size)) | ||||||
|  |             (cond ((file-remote-p (or file buffer-file-name)) | ||||||
|                    (vlf-tune-conservative types)) |                    (vlf-tune-conservative types)) | ||||||
|                   ((<= 1 max-idx) |                   ((<= 1 max-idx) | ||||||
|                    (if (< max-idx 3) |                    (if (< max-idx 3) | ||||||
|                        (vlf-tune-conservative types (/ max-idx 2)) |                        (vlf-tune-conservative types (/ max-idx 2)) | ||||||
|                  (vlf-tune-binary types 0 max-idx))))))) |                      (vlf-tune-binary types 0 max-idx)))) | ||||||
|  |             (if (= batch-size vlf-batch-size) ;local maxima? | ||||||
|  |                 (vlf-tune-linear types max-idx))))))) | ||||||
|  |  | ||||||
| (defun vlf-tune-optimal-load (types &optional min-idx max-idx) | (defun vlf-tune-optimal-load (types &optional min-idx max-idx) | ||||||
|   "Get best batch size according to existing measurements over TYPES. |   "Get best batch size according to existing measurements over TYPES. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user